Changing output file's extension from csv to txt