More cleanly catch and avoid intermittent pipe failures for sorting and splitting from BAM inputs