Added some logging hooks, attempting to stomp a bug.