Using console.error instead of console.log