public void saveData(File file) {
		try {
			BufferedWriter out = new BufferedWriter(new FileWriter(file));
			String data = Statistics.exportData();
			if (data != null)
				out.write(data);
			else
				JOptionPane.showMessageDialog(
						dialog,
						"Error: no data to write!",
						"Error saving",
						JOptionPane.ERROR_MESSAGE
				);
			out.close();
		} catch (IOException e) {
			complain(e);
		} catch (NullPointerException e) {
			complain(e);
		}
	}