public RUBTClient(String[] args){
		// the following is a check to make sure the command line arguments were
		// stored correctly
		input = new Scanner(System.in);
		
		if(args.length != 2 && args.length != 3){
			System.err.println("Please enter command line arguments: <torrentfile>.torrent <saveFile>.<ext>");
			System.exit(0);
		}
		
		tfile = args[0];
		sfile = args[1];
		
		flag = "";
		if(args.length == 3){
			if(args[2].equals("-i")){
				System.out.print("Input IP: ");
				flag = input.next();
			}
		}
		file = new File(tfile);
		fsize = -1;
		
		tbytes = null;
		
		try
		{
			fstream = new FileInputStream(file);
			fsize = file.length();

			// Initialize the byte array for the file's data
			tbytes = new byte[(int) fsize];

			int point = 0;
			int done = 0;

			// Read from the file
			while (point < tbytes.length
					&& (done = fstream.read(tbytes, point,
							tbytes.length - point)) >= 0)
			{
				point += done;
			}

			fstream.close();

			torInfo = new TorrentInfo(tbytes);
			System.out.println("Init tracker...");
			
			torrentHandler = new TorrentHandler(torInfo,sfile);
			tracker = new Tracker(torInfo, torrentHandler, SERVER_PORT);
			
			peerManager = new PeerManager(SERVER_PORT, tracker, flag);
		
			Thread hajime = new Thread(new UserInput());
			hajime.start();
			
		} catch (FileNotFoundException e)
		{
			System.err.println(e.getMessage());
			return;
		} catch (IOException e)
		{
			System.err.println(e.getMessage());
			return;
		} catch (BencodingException e) {
			System.err.println(e.getMessage());
			return;
		}
	}