console.log for err