Added some hooks for logging
Fix in url.