call logger.error instead of logger.err