avoid infinite loops and log current url on exception\nfixes #8, #9