Add error checking in records_mm