minor reformatting of code.  added a begin rescue around add_Record to return any encoding or API errors.