merges output files