public void registerScript(InputStream in, Map<String,String> params,List<String> paramsFiles) throws IOException {
try {
String substituted = pigContext.doParamSubstitution(in, paramMapToList(params), paramsFiles);
GruntParser grunt = new GruntParser(new StringReader(substituted), this);
grunt.setInteractive(false);
grunt.parseStopOnError(true);
} catch (org.apache.pig.tools.pigscript.parser.ParseException e) {
log.error(e.getLocalizedMessage());
throw new IOException(e);
}
}