[fix] support --plain and --debug

Add support for --plain and --debug options as expected, fixes #358