String[] type1 = new String[1];
String[] type2 = new String[1];
if (createFile){
BufferedWriter fw = new BufferedWriter(new FileWriter(scriptFile));
psp.genSubstitutedFile (origPigScript, fw, params.size() > 0 ? params.toArray(type1) : null,
paramFiles.size() > 0 ? paramFiles2.toArray(type2) : null);
return new BufferedReader(new FileReader (scriptFile));
} else {
StringWriter writer = new StringWriter();