private final void listOrExtract(boolean extract) throws RuntimeException {
        String filename = arguments[0];
        TaggedData object = null;
        try {
            object = loadRootObject(filename);
        } catch (ImageError e) {
            System.err.println("redis: " + e.getMessage());
            System.exit(1);
        } catch (Format.OptionError e) {
            System.err.println("redis: " + e.getMessage());
            System.exit(1);
        }
        assert object != null;
        ReconstructionDataCollector rcn;
        try {
            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            PrintStream port = new PrintStream(stream);
            rcn = object.format.analyser.dis(object.format, object.data, port);
        } catch (ImageError e) {
            System.err.println("redis: " + filename + ": " + e.getMessage());
            System.exit(1);
            throw new RuntimeException("bug detected");
        }
        if (rcn == null || rcn.externalFileOrder.isEmpty()) {
            System.err.println("redis: " + filename + ": no children");
            System.exit(1);
            throw new RuntimeException("bug detected");
        }
        rcn.verifyReconstruction(object.data);
        if (!extract) {
            rcn.listExternalFiles();
        } else {
            try {
                rcn.writeExternalFilesOut(filename + ".rcn");
            } catch (IOException e) {
                System.err.println("redis: I/O error");
                e.printStackTrace(System.err);
                System.exit(1);
            }
        }
    }