Updated check_sam to raise exception

If no API key found. Otherwise generic error was being logged and process wasn't exiting with an error code.