added parallel output in groups to minimize number of files generated