Using Closed Channel and WaitGroup for Shutdown