added some log statements