public static void main(String[] args) throws IOException {
		// parse arguments
		if (args.length == 0 || args.length > 2)
			usage();
		boolean recursive = false;
		int dirArg = 0;
		if (args[0].equals("-r")) {
			if (args.length < 2)
				usage();
			recursive = true;
			dirArg++;
		}

		//TODO Configurations to be added
		//ConfigurationFactory factory = new ConfigurationFactory("config.xml");
		//Configuration config = factory.getConfiguration();

		// register directory and process its events
		Path dir = Paths.get(args[dirArg]);
		new DirectoryWatchService(dir, recursive).start();
	}