Fixed output file formatting