optionparser and some debug code