Fix of cleaning temp files.
(I commented them for test. but forgot restoring before committing)