formatting result file