public static void checkArgs(String[] args) {
      if (args.length != 3) {
  			System.err.print("Illegal number of arguments! "); 
			System.err.println("usage: <integer: maze height> <integer: maze width>" +
					" <output file name>");
			System.exit(1);
		} else {
			Scanner checker = new Scanner(args[0] + " " + args[1]);
			for (int i = 0; i < 2; i++) {
				if (!checker.hasNextInt() || checker.nextInt() <= 0) {
					System.err.print("Illegal argument(s)! First two command line parameters " + 
							"must be positive integers (0 not allowed). ");
					System.exit(1);
				}
			}
		}
	}