error');
          return;
        }

        if (baton !== null && (isNaN(baton) || baton < 1 || baton > 255)) {
          log('Baton value must be between 1 and 255', 'error');
          return;
        }

        if (isNaN(count) || count < 1) {
          log('Count must be a positive number', 'error');
          return;
        }

        // Create client options
        const options = {
          version,
          count
        };

        if (baton !== null) {
          options.baton = baton;
      