Worked on writing pdfs to file