cat-file: handle streaming failures consistently