public String setHostname(String hostname) {
		if (hostname.length() == 0 || getHostname().contains(hostname))
			return null;
		InetAddress ip;
		String hostnameAndIP = "";
		boolean valid = false;
		try {
			ip = InetAddress.getByName(hostname);
			hostnameAndIP = hostname + String.format(" (%s)", ip.getHostAddress());
			valid = true;
		} catch (Exception e) {
			if (hostname.matches("\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b")) {
				valid = true;
			}
		}
		if (valid) {
			this.hostname = hostname;
			return "Changed host to: " + hostnameAndIP;
		}
		return "Invalid hostname: " + hostname;
	}