Added support for grouping in text files.