Added some logging back in that got lost in the refactoring.