The script can fail if one of the binaries doesn't exist or cannot be run for some reason,
but these failures do not cause the script to return a non-zero exit code.
This patch makes the script return non-zero for these cases as well as cleaning up correctly.