support for sync document write