outputting error in the console.log