Added statistics logging to mongo_db