changed the command-line parameters processing: now both -c and -g should be set