improved error handling in file upload - informing user in case
something went wrong