Added debug statements - is intermittently returning a 400 (malformed
syntax) error when given a valid URL.