Adds more logging, trying to figure out what's going on.