@Override
    public void run() {
        if (!this.isStale()) return;

        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter(this.output);
        } catch (final IOException e) {
            this.plugin.getLogger().severe("Error opening file: " + this.output + "; " + e);
            return;
        }

        final BufferedWriter writer = new BufferedWriter(fileWriter);
        try {
            JSONValue.writeJSONString(this.getMarkers(), writer);

        } catch (final IOException e) {
            this.plugin.getLogger().severe("Error writing to file: " + this.output + "; " + e);

        } finally {
            try {
                writer.close();
            } catch (final IOException e) {
                this.plugin.getLogger().severe("Error closing BufferedWriter for : " + this.output + "; " + e);
            }
        }
    }