Snapshot snapshot = new Snapshot(game);
DebugConfig debugConfig = getConfig().getDebug();
if (debugConfig != null && "plain".equals(debugConfig.getSave_format())) {
snapshot.setGzipOutput(false);
}
snapshot.save(new FileOutputStream(file));
} catch (IOException | TransformerException ex) {
logger.error(ex.getMessage(), ex);
JOptionPane.showMessageDialog(this, ex.getLocalizedMessage(), _("Error"), JOptionPane.ERROR_MESSAGE);
}
}