public void save(File target) throws IOException, Exception {
		try {
			connection.close();
		} catch(Exception e) {
			throw new Exception(Localization.getInstance().get("databaseReleaseExceptionMessage") + " " + e);
		}
		if (Files.exists(target.toPath())) {
			try {
				Files.delete(target.toPath());
			} catch (IOException e) {
				throw new IOException(MessageFormat.format(Localization.getInstance().get("fileExistsExceptionMessage"), target) + e);
			}
		}
		try {
			OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(workingDirectory + "/VERSION"), Charset.forName("UTF-8"));
			writer.write("1.0");
			writer.close();
			
			writer = new OutputStreamWriter(new FileOutputStream(workingDirectory + "/settings.json"), Charset.forName("UTF-8"));
			settings.save(writer);
			writer.close();
			
			ZipFile zip = new ZipFile(target);

			ZipParameters parameters = new ZipParameters();
			parameters.setCompressionMethod(Zip4jConstants.COMP_DEFLATE);
			parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);

			File[] files = workingDirectory.toFile().listFiles();

			for (File f : files) {
				zip.addFile(f, parameters);
			}
		} catch (Exception e) {
			throw new IOException(Localization.getInstance().get("fileSaveExceptionMessage") + " " + e);
		}
		connectDatabase();
	}