Fix removing temp files

Fix removing temp files