Fixed writing clear text to file.