Error handling for cmd option.