add a checkPipe loop for waiting the pipe file

this will prevent PipeReader from creating a normal file when pipe file does not exist.