Fix deleting of temp files