conditionally handle wkhtmltopdf's failure to exit