move write statuses logic to a separate func
move write statuses logic to a separate func

warmchang/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,kubernetes/minikube,warmchang/minikube,warmchang/minikube,warmchang/minikube,warmchang/minikube,kubernetes/minikube,warmchang/minikube,warmchang/minikube