Fixed deletion of temp files