Correct issue where temp files were not getting removed.