update pdf and txt file generation