write new toc in the same place as all text files