Enhancing the crystallization and optimizing the orientation of perovskite films via controlling nucleation dynamics