Made some changes to eliminate an error about the number of open files when
reading large data sets.