Added routine for generating .txt file for editing data