createDoc can also read doc from a file