Added some logging to see what's going on.