Log some more errors.

Here's some additional logging I found handy, your mileage and philosophy may differ, so I separated it into a different pull request.

Cheers,

Simon