adding assertion
adding logging
adding logging
better assert
Merge pull request #195 from raghavgautam/master

minor changes