cblogctl: using getopt for cmdline parsing