Add some more logging to try to diagnose occasional NPE on CI