public void saveTo(String path) {
try {
OutputFormat format = new OutputFormat(doc);
format.setIndenting(true);
XMLSerializer serializer = new XMLSerializer(new FileOutputStream(new File(path)), format);
serializer.serialize(doc);
} catch (FileNotFoundException e) {
e.printStackTrace();
ErrorUtil.openStackTraceDialog("A Fatal Error has occured and the application will need to shut down", e);
System.exit(1);
} catch (IOException e) {