Added a retry loop for sdb registry writes.