Update mongodb instance creation.