Delete file on error