Add debug mode
Merge branch 'master' into gh-pages