protected void export(String toDirectory, ConfigInstance cfg) throws IOException {
        Writer writer = null;
        try {
            String fileName = getDerivedName() + ".cfg";
            if (toDirectory != null) {
                writer = IOUtils.createWriter(toDirectory + "/" + fileName, false);
                exportConfig(writer, cfg);
            }
        }
        finally {
            if (writer != null) IOUtils.closeWriter(writer);
        }
    }
Returns the value of getName if true, the given number as a string otherwise
config-model/src/main/java/com/yahoo/schema/derived/Derived.java