main: Log uncaught exceptions