Fix phantom stdout error detection