fileRecord, better error handling in methods and callers