support base/rootURL in formatURL
debugging