writing out the docObject no matter what