Fixing issue when the url is wrong with logging output