The gui can now toggle final sys.exit call by setting exit_on_quit flag