private static void saveExecutionData(byte[] executionData, File outputFile) {
        logger.info("Saving JaCoCo execution data to file: '{}'", outputFile.getAbsolutePath());
        if (outputFile.exists()) {
            throw new JaCoCoToGoException("outputFile '" + outputFile.getAbsolutePath() + "' already exists.");
        }
        File outputFileDir = outputFile.getAbsoluteFile().getParentFile();
        if (!outputFileDir.exists()) {
            if (!outputFileDir.mkdirs()) {
                throw new IllegalArgumentException("Failed to create directory: '" + outputFileDir.getAbsolutePath() + "'");
            }
        }

        if (executionData == null) {
            logger.warn("executionData is null, nothing to save");
            return;
        }
        FileOutputStream fos = null;
        BufferedOutputStream bos = null;
        try {
            fos = new FileOutputStream(outputFile);
            bos = new BufferedOutputStream(fos);
            bos.write(executionData);
            bos.flush();
        } catch (IOException ex) {
            throw new JaCoCoToGoException("Error saving execution data to file: " + outputFile.getAbsolutePath(), ex);
        } finally {
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException ex) {
                    // bummer
                }
            }
            if (bos != null) {
                try {
                    bos.close();
                } catch (IOException ex) {
                    // bummer
                }
            }
        }
    }