public synchronized boolean writeVar(String key, Object obj)
	{
		Utils.logger.log(Level.INFO, "Writting var " + key);
		String value = obj == null ? "" : obj.toString();
		List<String> oldConfiguration;
		oldConfiguration = this.currentConfig;
		FileWriter fileWriter;
		try
		{
			fileWriter = new FileWriter(this.configFile, false);
		}
		catch(final IOException exception)
		{
			Utils.logger.log(Level.WARNING, "Failed to write config file!", exception);
			return false;
		}
		final PrintWriter printWriter = new PrintWriter(new BufferedWriter(fileWriter));
		boolean writted = false;
		if(oldConfiguration != null)
			for(String string : oldConfiguration)
				if(string.startsWith(key + ":"))
				{
					writted = true;
					printWriter.println(key + ":" + (value == null ? "" : value));
				}
				else
					printWriter.println(string);
		if(!writted)
			printWriter.println(key + ":" + (value == null ? "" : value));
		printWriter.close();
		this.currentConfig = readSmallTextFile(this.configFile);
		Utils.logger.log(Level.INFO, "Config file wrote");
		return true;
	}