check pid before start