build the concatenated file