Add logging to try to diagnose WSOD problem