fixed tmpdir removal error