Log uncaught exceptions and crash on windows