Updated temp file deletion.