public static void handleMain(String[] args, OggAudioInfoTool tool) throws Exception {
        if(args.length == 0) {
            printHelp(tool);
        }

        boolean debugging = false;
        String filename = args[0];
        if(args.length > 1 && args[0].equals("-d")) {
            filename = args[1];
            debugging = true;
        }

        File file = new File(filename);
        if (! file.exists()) {
            System.err.println("Error - file not found");
            System.err.println("   " + file);
            System.exit(2);
        }

        tool.process(file, debugging);
    }