Make child process running check more robust