fix region list race condtion, add debug switch for api hostname