public void processFile() throws IOException {
        if (displayInfo) {
            System.out.println("  *** tape info:");
            System.out.println("    " + getTapeRecord().toString());
            for (FileRecord fileRecord : getFileRecords()) {
                System.out.println("  *** file record:");
                System.out.println("    " + fileRecord.toString());
            }
            System.out.println("no files being extracted");
        } else {
            System.out.println("  *** tape info:");
            System.out.println("    " + getTapeRecord().toString());
            File outputDir = new File(destination);
            if (!outputDir.exists() && !outputDir.mkdirs()) {
                throw new IOException("Destination '" + destination + "' does not exist and cannot be created");
            }

            String baseFilename = FilenameUtils.getBaseName(getT64Filename());
            FileRecord [] normalRecords = getNormalFileRecords();
            int fileIndex = 0;
            for (FileRecord fileRecord : normalRecords) {
                System.out.println("  *** file record:");
                System.out.println("    " + fileRecord.toString());
                String outputFilename;
                if (StringUtils.isNotBlank(fileRecord.getC64Filename())) {
                    outputFilename = T64Helper.cleanString(fileRecord.getC64Filename().toLowerCase());
                } else {
                    outputFilename = (normalRecords.length > 1 ? baseFilename + StringUtils.leftPad(Integer.toString(fileIndex), 2, '0') + ".prg": baseFilename + ".prg").toLowerCase();
                }

                byte[] bytes = Files.readAllBytes(Paths.get(getT64Filename()));
                Path destPath = Paths.get(destination, outputFilename);
                byte[] outputBytes = new byte[fileRecord.size() + 2];
                outputBytes[0] = (byte)((fileRecord.getStartAddress() << 8) >> 8);
                outputBytes[1] = (byte)(fileRecord.getStartAddress() >> 8);
                for (int i = 0; i < fileRecord.size(); i++) {
                    outputBytes[i + 2] = bytes[fileRecord.getOffset() + i];
                }
                Files.write(destPath, outputBytes);
                System.out.println("    written to: " + destPath);
            }
        }
    }