safe MongoDB loading