replaced console.log with log.debug