Add some logging to see what's going on.