Check out the document first before setting the content stream