private static GameStats populateGameStats(String fileName) throws IOException {
	  Scanner file = new Scanner(new File(fileName));
	  
	  GameStats gs = null;
	  boolean processPlayerLine = false;
	  int numGames = 0;
	  
	  while (file.hasNextLine()) {
	    String line = file.nextLine();
	    if (!line.startsWith(COMMENT_MARK)) {
	      if (!processPlayerLine) {
	        // The first line containing player names
	        List<String> players = new LinkedList<String>();
	        Scanner nameScanner = new Scanner(line);
	        while (nameScanner.hasNext()) {
	          players.add(nameScanner.next());
	        }
	        nameScanner.close();
	        Collections.sort(players);
	        
	        gs = new GameStats(players);
	        processPlayerLine = true;
	      } else {
	        // Lines containing game data
	        Scanner gameScanner = new Scanner(line);
	        
	        String p1 = gameScanner.next();
	        String p2 = gameScanner.next();
	        char r1 = gameScanner.next().toUpperCase().charAt(0);
	        char r2 = gameScanner.next().toUpperCase().charAt(0);
	        String winner = gameScanner.next();
	        gameScanner.close();
	        
	        numGames++;
	        Match m = new Match(p1, p2, r1, r2, winner);
	        gs.addMatch(m);
	      }
	    }
	  }
	  file.close();
    
	  System.out.println("Number of games processed: " + numGames);
	  
    return gs;
	}