Added uncaught exception catcher