check for null req.app.logger before accessing req.app.logger.error