added check for shutdown hook
checked shutdown hook