avoid segfault when loading recs from a patch with files not found
search also for '\r' in getValue