generator: keep files open