iterate over lines of a text files