added some logs for debug