rename tmp files to regular ones