Added error catching and printing to HMAC example