We should close `doneChan` and then use a `sync.WaitGroup` to wait for all goroutines to exit before closing the rest of the channels