public static void main(String[] args) throws Exception {
		System.setSecurityManager(null);

		// Script file
		String scriptFile = (args.length < 1) ? "trips" : args[0];
		// Registry host
		String host = (args.length < 1) ? null : args[1];
		Registry registry = LocateRegistry.getRegistry(host);

		// Lookup agency
		Agency agency = null;
		try {
			agency = (Agency) registry.lookup(Agency.class.getSimpleName());
		} catch (NotBoundException e) {
			System.err.println("Agency not bound");
			System.exit(-1);
		}

		// Run client
		try {
			Client client = new Client(scriptFile, agency);
			client.run();
		} catch (Exception e) {
			System.err.println("Client exception: " + e.toString());
			e.printStackTrace();
		}
	}