The best question would be to ask WHY do you want to put it into one file?

PS: the code break down to garbage near the end, after the 3rd group.