Add _exitHook to ease subclass use of exit actions
Keep logfile open and use _exitHook to close