Adding mongo replica_primary check