Fix path issue; handle trailing slash in scheme uri
Adapt to changes in load_stw