handle non-zero exit from pdflatex