check mainPid