Error checking to restore db fxns