fix that multiple command line arguments can get passed

test case: add a --option-file and activate pretty print output. It will break because the loop only runs once through the switch before checking for two remaining arguments. Both pretty print and --option-file have to get processed inside the switch.