add log output to track redirects