Spruce up error handler a bit