major fixes: check pid, fixed perf cmd line