public void shutdown(){
		acceptor.interrupt();
    	try {
			System.out.println("Updating config");
    		Properties prop = new Properties();
    		prop.load(new FileInputStream("config.properties"));
			String ports = prop.getProperty(hostname);
			if (ports  != null && ports.contains(localPort)) {
				System.out.println("Old Ports for this host - "+ports);
				System.out.println(localPort);
				ports = ports.replaceAll(localPort, "");
				ports = ports.replaceAll(",,", ",");
				if(ports.startsWith(","))
					ports = ports.substring(1);
				if(ports.endsWith(","))
					ports = ports.substring(0,ports.length()-1);
				System.out.println("New Ports for this host - "+ ports);
                if(ports.isEmpty())
                    prop.remove(hostname);
                else
				    prop.put(hostname, ports);
			}
			prop.store(new FileOutputStream("config.properties"), null);		
		} catch (FileNotFoundException e) {
			System.out.println("Config file not found.");
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		System.out.println("Server:stopped ");		
	}