Changed pipe reading method.