Add in registrar happens early in startup, and will be run near the end of shutdown. Even if iocInit() isn't run. Also use an initHook to add cleanupPy(), which happens late in startup, and will be run early on shutdown. Though only if iocInit() is run.