Better exception matching.... and better log messages.