correction for correct type of output file -- txt