split: fix reporting of read errors