IDE update
Ensure library exits cleanly on app exit with new API