print error to log.