catch uncaught exceptions FIRST