Use logger.warn instead of console.log