Renamed helper method to starte with 'Write',

instead of starting with 'Add', in order to make it clearer that this
method actually writes documents to the underlying storage.
Extracted a helper method.