def METHOD_NAME(args):
    if not os.path.exists(args.filename):
        print(f"{scriptName}: input file {args.filename} does not exist!")
        sys.exit()
    if not args.filename.endswith(".json") and (args.output_filename is None or args.output_filename == ""):
        print(f"{scriptName}: input file {args.filename} does NOT end in .json. Cannot autogenerate output filename; specify a path yourself")
        sys.exit()
    if args.output_filename is None or args.output_filename == "":
        args.output_filename = args.filename.replace(".json", "")
    print(f"{scriptName}: will write output to {args.output_filename}")