Use iterators for reading instead of glob.