error handling while file upload