properly delete unused temp file