Move code around to improve logging and to display errors when debug is verbose.
Changes to request classes to ensure necessary variables are set early enough and to improve logging data.