[autotex] Improve logging and output handling