pt_util: Protect against corrupt input files