adding logging to diagnose