Use logger.debug instead of puts