move url handling to after settings load debug