Add some logging to help troubleshoot.