def METHOD_NAME(filename: Path, is_write_file: bool, is_verbose: bool) -> int:
    try:
        expect = json.loads(filename.read_text())
        alphabetize_modules(expect[0])
        actual = [generate_combos(new_archive=expect[0]["new_archive"])]
        diff = Compare().check(expect, actual)
        if is_verbose:
            logger.info("=" * 80)
            logger.info("Program Output:")
            logger.info(json.dumps(actual, sort_keys=True, indent=2))
            logger.info("=" * 80)
            logger.info(f"Comparison with existing '{filename}':")
            logger.info(json.dumps(diff, sort_keys=True, indent=2))
            logger.info("=" * 80)
        if diff == NO_DIFF:
            logger.info(f"{filename} is up to date! No PR is necessary this time!")
            return 0  # no difference
        if is_write_file:
            logger.info(f"{filename} has changed; writing changes to file...")
            write_combinations_json(actual, filename)
            return 0  # File written successfully
        logger.warning(f"{filename} is out of date, but no changes were written")
        return 1  # difference reported
    except (ArchiveConnectionError, ArchiveDownloadError) as e:
        logger.error(format(e))
        return 1