Document can now writ to a file.  testGetText technically fails but its only because of a new line character at the end of the string