collate samples into output files