writes text box contents to file, but insufficient amount of bytes.