Parsing Command line option works for buttons, but no command immediately exits the program