Fix bugs in linux cats script