Added WriteConcernResult checks and logging