auto delete temp file while error