add logging to diagnose problem