added some mutex on mongodb wrapper