call ShutdownIOManager() before closing handles