Add ShutdownHook in main class