change writ.out to txt