Refining the record text file format and the output format