We studied the effects of postsynthesis thermal treatments on material properties of CH3NH3PbI3 perovskite films and their photovoltaic performance. Kelvin probe force microscopy revealed the existence of a positive potential barrier at grain boundaries, which is known to be beneficial by suppressing carrier recombination. The height of the barrier increased with the annealing duration, which directly correlated with the device performance. The origin of the potential barrier appeared to be chemical inhomogeneity as revealed by Nano-Auger electron spectroscopy. Qualitatively similar temperature dependence of current-density vs bias characteristics was observed regardless of the annealing duration, where efficiency collapsed at low temperatures due to a diverging series resistance. The freeze-out of free carriers and/or a Schottky-type barrier(s) at the interface(s) are likely responsible for the diverging series resistance.