Close attachment stream in compileDocumentProperties method.