Error handling: at least log them to the console.

I know that real error handling is much more than this, but a little
bit is better than nothing.