deletion of temp files when updating original file