Function recordExtract modified so that files with no keys (possibly empty)