public function setWriteConcern($w, $timeout = 10000)
    {
        if (!$this->getMongoClient()->setWriteConcern($w, (int) $timeout)) {
            throw new Exception('Error setting write concern');
        }
        
        return $this;
    }