public static Position getNextPosition(LineNumberReader reader) {
		try {
			String line = reader.readLine();
			if(line == null) {
				throw new PositionFileException("The specified file contains not enough positions");	
			}
			try {
				String[] parts = line.split(",");
				if(parts.length < 3) {
					throw new PositionFileException("Illegal line: expected three doubles, separated by comma. Found \n" + line);	
				}
				double x = Double.parseDouble(parts[0]);
				double y = Double.parseDouble(parts[1]);
				double z = Double.parseDouble(parts[2]);
				return new Position(x,y,z);
			} catch(NumberFormatException e) {
				throw new PositionFileException("Illegal line: expected three doubles, separated by comma. Found \n" + line);
			}
		} catch (IOException e) {
			throw new PositionFileException(e.getMessage());
		}
	}