mutualizing code to add result with pattern matching check
modification to ease toggling debug mode
Merge pull request #17 from GMaissa/develop

Ease toggling debug mode