Move removal of temp file until end of initial sync.
Move removal of temp file until end of initial sync.

This prevents a spurious message about being unable to sync the tmp file showing in the logs as it was usually getting removed before the sync finished.

phase2/rig,phase2/rig