private void writeDataIntoConfigurationFile(Document document) throws XMLException {
		
		try {
			
			TransformerFactory tf = TransformerFactory.newInstance();
			tf.setAttribute("indent-number", 2);
			Transformer tr = tf.newTransformer();
			tr.setOutputProperty(OutputKeys.INDENT, "yes");
			tr.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
			DOMSource source = new DOMSource(document);
			StreamResult result = new StreamResult(confFile);
			tr.transform(source, result);
			
		} catch (TransformerConfigurationException e) {
			log.severe("Creating configuration document failed (can't create Transformer)!");
			throw new XMLException("Creating configuration document failed (can't create Transformer)!", e); 
		} catch (TransformerException e) {
			log.severe("Creating configuration document failed (some error during transformation)!");
			throw new XMLException("Creating configuration document failed (some error during transformation)!", e);
		} catch (NullPointerException e) {
			log.severe("Can't write null Document!");
			throw new XMLException("Can't write null Document!", e);
		}
		
		log.info("Configuration file saved");
	}