Do not send the output to dev/null. Then there will be no way to debug. Use ${T}/build-latex.log or similar.