fix some some records, add machine parseable output