well damn.
now the program outputs both "groupA.txt" and "groupB.txt". But as I expected. it overwrites the file each time it opens up.
so now each output file only has one line of data from the last line of the sample output files.
so now the question is.......how's the command to tell the program to NOT overwrite what's in that file.