logging added to exportToPdf