Now logs to a txt file, with grouping