update db_utils for better exception handling