added process event handlers for exit event and uncaughtException event