change console.log to debug