Added error logging to dynamodb persistence