private PortalScript getPortalScript(String scriptName) {
		if (scripts.containsKey(scriptName)) {
			return scripts.get(scriptName);
		}

		File scriptFile = new File("scripts/portal/" + scriptName + ".js");
		if (!scriptFile.exists()) {
			scripts.put(scriptName, null);
			return null;
		}

		FileReader fr = null;
		ScriptEngine portal = sef.getScriptEngine();
		try {
			fr = new FileReader(scriptFile);
			CompiledScript compiled = ((Compilable) portal).compile(fr);
			compiled.eval();
		} catch (ScriptException e) {
			log.error("THROW "+scriptName+" ", e);
		} catch (IOException e) {
			log.error("THROW "+scriptName+" ", e);
		} finally {
			if (fr != null) {
				try {
					fr.close();
				} catch (IOException e) {
					log.error("ERROR CLOSING", e);
				}
			}
		}
		
		PortalScript script = ((Invocable) portal).getInterface(PortalScript.class);
		scripts.put(scriptName, script);
		return script;
	}