Handle file write exception.

Connection cancel on file write exception, and notify error to user with completionHandler.