replace console.log => debug