private static void validateProperties(Properties properties) {
		String portProperty = getProperty(properties, PORT_PROPERTY);
		try {
			Integer.parseInt(portProperty);
		} catch (NumberFormatException e) {
			exit("Port is not a number.");
		}

		String rootProperty = getProperty(properties, ROOT_PROPERTY);
		if (!(new File(rootProperty).isDirectory())) {
			exit("Root is not a directory.");
		}

		String maxThreadsProperty = getProperty(properties, MAX_THREADS_PROPERTY);
		try {
			Integer.parseInt(maxThreadsProperty);
		} catch (NumberFormatException e) {
			exit("Max threads is not a number.");
		}

		String smtpName = getProperty(properties, SMTP_NAME_PROPERTY);
		try {
			InetAddress.getByName(smtpName);
		} catch (UnknownHostException e) {
			exit("Couldn't resolve the " + SMTP_NAME_PROPERTY + " IP address.");
		}

		String smtpPort = getProperty(properties, SMTP_PORT_PROPERTY);
		try {
			Integer.parseInt(smtpPort);
		} catch (NumberFormatException e) {
			exit(SMTP_PORT_PROPERTY + " is not a number.");
		}

		String reminderFilePath = getProperty(properties, REMINDER_FILE_PATH_PROPERTY);
		checkCanWrite(reminderFilePath);

		String taskFilePath = getProperty(properties, TASK_FILE_PATH_PROPERTY);
		checkCanWrite(taskFilePath);

		String pollFilePath = getProperty(properties, POLL_FILE_PATH_PROPERTY);
		checkCanWrite(pollFilePath);

		getProperty(properties, DEFAULT_PAGE_PROPERTY);
		getProperty(properties, SERVER_NAME_PROPERTY);
		getProperty(properties, SMTP_USERNAME_PROPERTY);
		getProperty(properties, SMTP_PASSWORD_PROPERTY);
		getProperty(properties, SMTP_IS_AUTH_LOGIN_PROPERTY);

		String logLevel = getOptionalProperty(properties, LOG_LEVEL_PROPERTY);
		if (logLevel != null) {
			HelperLogger.logLevel = HelperLogger.LogLevel.valueOf(logLevel.toUpperCase());
		} else {
			HelperLogger.logLevel = HelperLogger.LogLevel.DEBUG;
		}
	}