private File resolveName(Leola runtime, String lib, boolean withExt) throws Exception {
		File libFile = new File(lib);
				
		if ( ! libFile.isAbsolute() ) {
			File wd = runtime.getWorkingDirectory();
			List<File> dirs = runtime.getIncludePath();
			
			int i = 0;			
			for( libFile = new File( wd.getAbsolutePath() + "/" + lib);
				! libFile.exists() && i < dirs.size();
				libFile = new File( dirs.get(i++).getAbsolutePath() + "/" + lib) ) {				
			}
			
			if ( ! libFile.exists() /*|| ! libFile.isFile()*/ ) {
				if(withExt) {
					// prefer the leolac version of the file
					libFile = resolveName(runtime, lib + ".leolac", false);
					
					if ( ! libFile.exists() || ! libFile.isFile()) {
						libFile = resolveName(runtime, lib + ".leola", false);
					}
				}
		
				if ( withExt && ( !libFile.exists() /*|| !libFile.isFile() */) ) {
					throw new IOException(lib + " was not found!");
				}
			}
		}
						
		return libFile;
	}