@Override
  public Basis load(String name) throws PersistenceException {
    File loadFile = getFile(name);
    BufferedReader fileReader = null;

    try {
      fileReader = new BufferedReader(new FileReader(loadFile));
    }
    catch (FileNotFoundException e) {
      System.err.println("File couldn't be loaded");
      e.printStackTrace();
    }

    Set<Node> vertices = new HashSet<Node>();
    Set<Connection> arrows = new HashSet<Connection>();

    String line = null;
    try {
      while (!"".equals((line = fileReader.readLine()))) {
        Node newNode = new Node(line, fileReader.readLine());
        vertices.add(newNode);
      }

      while ((line = fileReader.readLine()) != null && line.contains(" -> ")) {
        String[] parts = line.split(" -> ");
        Connection newConnection = new Connection(parts[0].trim(), parts[1].trim());
        arrows.add(newConnection);
      }
    }
    catch (IOException e) {
      System.err.println("IO error");
      e.printStackTrace();
    }
    catch (ArrayIndexOutOfBoundsException e) {
      System.err.println("File was misformatted");
      e.printStackTrace();
    }

    try {
      fileReader.close();
    }
    catch (IOException e) {
      System.err.println("OS is being a bitch");
      e.printStackTrace();
    }

    return new Basis(name, vertices, arrows);
  }