Logging / race condition
Add shuttingDown() and logging