Should have a check to see if there was an error while creating the doc.