functionality to read, combine and write out multiple data files