Added sanity check for -charset option