public String execWithPars(Problem problem, String file)
	{
		String line = null;

		try
		{
			Service service = null;
			Host host = null;
			if (problem != null) {
				host = problem.getHost();
				service = problem.getService();
			}

			String pluginOutput = "";
			if (service != null)
				pluginOutput = service.getParameter("plugin_output");
			else if (host != null)
				pluginOutput = host.getParameter("plugin_output");

			String [] args = { file, problem != null ? problem.getHost().getHostName() : "", service != null ? service.getServiceName() : "", problem != null ? problem.getCurrent_state() : "", pluginOutput };

			System.out.println("Invoking " + file);
			Process p = Runtime.getRuntime().exec(args);
			p.waitFor();
			BufferedReader output = new BufferedReader(new InputStreamReader(p.getInputStream()));
			line = output.readLine();

			if (line == null || line.equals("")) {
				BufferedReader errStreamReader  = new BufferedReader(new InputStreamReader(p.getErrorStream()));
				line = errStreamReader.readLine();
				errStreamReader.close();
			}
			System.out.println(file + " returned: " + line);

			output.close();

			p.destroy();
		}
		catch(Exception e)
		{
			line = e.toString();
			showException(e);
		}

		return line;
	}