add a checkPipe loop for waiting the pipe file