thermologger: handle exit code