added some debug info messages to diagnose flow