Raise exception if hook script doesn't exit with 0