Added handler for unhandled exceptions, just to get some logging.