Added a log message to show the modified URL and added guard conditions to debug logs