replaced deprecated Mongo usage with MongoClient. Fallback to Mongo.