Format output data into one file