add upload error handler