added debug/non-debug mode in MatchingViewer class