Update writeToServerDocuments to take config object
#4213
Merged
writeToServerDocuments to take config object
#4213