Revert "add shutdown hook"

This reverts commit 8703468e208b4de7d6edf14bf15cca86b74e7d42.