Change write csv to write txt