Fixed deleted temp file after closed