Move most of the console.log to logger.debug