Could you include the code to save the extracted text to a new text file or append to existing file?