removed some unnecessary log statements
added some debug statements