:fix: bugs on storage/UT of mongo and add middleware.get_uri function