Better clean up of temporary file.