Add some error handling for missing email key