cat.cpp bug squashed via checked return value