ReportDesign.afterFactory code
To close the log file, add the following statement to ReportDesign.afterFactory:
printWriter.close( );
Using this method flushes all the buffers and ensures that all script output appears in the file.
To provide the ReportDesign.afterFactory code, select the top line of the outline and select the afterFactory script on the script page.