reset optind opterr inside the function calls ...