fix bug around remove temporary fiels.