edit check is runnig fix write pid.txt