sifts through records and puts to a text file.