ADD: exception handling for getopt