Use iterators instead of glob.