Used sync.WaitGroup that waits for a collection of goroutines to finish.