changed output file to .txt from .csv