added preserveLogFile option for generatePdf()