@Override
    public IExportWriter createWriter(ExportImportConfigParser config, IApimanLogger logger) {
        if (config.getJsonFile() == null)
            throw new IllegalArgumentException("Must provide path to JSON file to write");

        File outFile = new File(config.getJsonFile());

        if (outFile.exists() && !config.isOverwrite()) {
            throw new RuntimeException("File already exists: "+ outFile);
        } else if (outFile.exists()) {
            outFile.delete();
        }

        try {
            outFile.createNewFile();
            OutputStream os = new FileOutputStream(outFile);
            return new JsonExportWriter(os, logger);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
@see io.apiman.manager.api.exportimport.json.IExportImportFactory#createWriter(io.apiman.manager.api.exportimport.manager.ExportImportConfigParser, IApimanLogger)
manager/api/export-import/src/main/java/io/apiman/manager/api/exportimport/json/JsonFileExportImportFactory.java