added some debug logs