Changed output to txt