Add logging define. Add logic to escape URL path components