add ability to write to txt files