Tracking ferroelectric domain formation during epitaxial growth of PbTiO3 films