Adding some debug messages to the redirects.