proper removal of tmp files