Remove warnings and move exit status behind an cmdline option