handle process exit on uncaught exception as well