Added error handling to report submission.