Nicer error logging in the console.