public static LineNumberReader getPositionFileReader(String fileName) throws PositionFileException {
		LineNumberReader reader = null;
		String name = null;
		
		if(fileName == null) {
			JFileChooser fc = new JFileChooser(AppConfig.getAppConfig().getLastSelectedFileDirectory());
			fc.setDialogTitle("Select input file");
			SingleFileFilter posFf = new PositionFileFilter();
			fc.setAcceptAllFileFilterUsed(true);
			fc.setFileFilter(posFf);
			if(fc.showOpenDialog(Tools.getGUI()) != JFileChooser.APPROVE_OPTION){
				throw new PositionFileException("Aborted file selection");
			}
			name = fc.getSelectedFile().getPath();
			String p = name;
			p = p.substring(0, p.length() - fc.getSelectedFile().getName().length()); // remember the selected path
			AppConfig.getAppConfig().lastSelectedFileDirectory = p;
		} else {
			name = fileName;
		}

		try {
			reader = new LineNumberReader(new FileReader(new File(name)));
		} catch (FileNotFoundException e) {
			throw new PositionFileException(e.getMessage());
		}
		try {
			// skip the first lines
			String numNodes = reader.readLine();
			while(numNodes != null && !numNodes.equals(separator)) {
				numNodes = reader.readLine(); 
			}
		} catch (IOException e) {
			throw new PositionFileException(e.getMessage());
		}
		return reader;
	}