Adding check for pdftotext if it's required, but not before