If the caller needs to reconfigure klog, then calling klog without proper synchronizing while stopping causes a data race. We have to ensure that the goroutine has terminated before stop returns.