private static NetworkFilter createNetworkFilter(File file) {
		// create and load default properties
		Properties defaultProps = new Properties();
		FileInputStream inputStream;
		try {
			inputStream = new FileInputStream(file);
			defaultProps.load(inputStream);
			inputStream.close();
			currentFilterFile = file;
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		String expression;
		int optimize;
		int netmask;
		String source;
		if (defaultProps.containsKey(HOST_KEY)) {
			expression = HOST_KEY + " " + defaultProps.getProperty(HOST_KEY);
		} else {
			expression = "";
		}
		if (defaultProps.containsKey(OPTIMIZE)) {
			try {
				optimize = Integer.parseInt(defaultProps.getProperty(OPTIMIZE));
			} catch (NumberFormatException e) {
				optimize = USE_OPTIMIZATION; // employ
			}
		} else {
			optimize = USE_OPTIMIZATION;
		}
		if (defaultProps.containsKey(NETMASK)) {
			try {
				netmask = Integer.parseInt(defaultProps.getProperty(NETMASK));
			} catch (NumberFormatException e) {
				netmask = _8_BITS_MASK; // employ
			}
		} else {
			netmask = _8_BITS_MASK;
		}

		if (defaultProps.containsKey(SOURCE_IP)) {
			source = defaultProps.getProperty(SOURCE_IP);
		} else {
			source = null;
		}
		return new NetworkFilter(expression, optimize, netmask, source);
	}