Don't continue sending the file when there has been an error