file upload error handling

improved error handling on file upload xhr