public void openFile(String filename){
    	 File f = new File(config.getProperty("IRCFileFolder") + File.separator + filename);
    	if(f.exists()){
    		String extension = f.getName().substring(f.getName().lastIndexOf(".") + 1);
    		if(!extension.equals("scpt")){
    			gui.addLogLine("[DeBug]" + " File Exists.");
    			try {
    				Desktop.getDesktop().open(f);
    				gui.addLogLine("[DeBug]" + " Tried opening file.");
    			} catch (IOException e) {
    				e.printStackTrace();
    			}
    		} else {
    			try {
    				Runtime.getRuntime().exec("osascript " + f.getAbsolutePath().replace(" ", "\\ "));//ehkdr cdeztksozrr

				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
    		}
    		
    	}
    }