Write message in case of errors.