code: private String getName(CommandContext ctx, boolean failInBatch) throws CommandLineException {
          final ParsedCommandLine args = ctx.getParsedCommandLine();
          final String name = this.name.getValue(args, true);
          if (name == null) {
              throw new CommandFormatException(this.name + " is missing value.");
          }
          if (!ctx.isBatchMode() || failInBatch) {
              if (!Util.isValidPath(ctx.getModelControllerClient(), Util.DEPLOYMENT_OVERLAY, name)) {
                  throw new CommandFormatException("Deployment overlay " + name + " does not exist.");
              }
          }
          return name;
      }
docs: Validate that the overlay exists. If it doesn't exist, throws an
  exception if not in batch mode or if failInBatch is true. In batch mode,
  we could be in the case that the overlay doesn't exist yet.