check pid instead of state file