Another way to iterate over lines in files