Handle issue with output being split over multiple reads.