Replaced pdflatex with latexmk and matching options. Furthermore added a clean-job after processing.