getopts: maintain the order of arguments