Added error handling for image upload and report posting