Add debug mode.
Merge pull request #27 from xtao/vilya

Add debug mode.