Dynamics of polymer film formation during spin coating