Minor bugfixes, and improvements to request logging