changing output file's extension from csv to txt