Added line that writes new dataset to txt file