We've observed that sometimes check-names.sh exits unexpectedly with status 2 and no error message. The failure is not reproducible. This commits makes the script print a trace if it exits unexpectedly.