better detection of end of pDump