2467fa
diff --git a/rtslib/root.py b/rtslib/root.py
13ebeb
index ac40752..8e9724b 100644
2467fa
--- a/rtslib/root.py
2467fa
+++ b/rtslib/root.py
13ebeb
@@ -166,19 +166,19 @@ class RTSRoot(CFSNode):
2467fa
             self._dbroot = self._default_dbroot
2467fa
             return
2467fa
         self._dbroot = fread(dbroot_path)
2467fa
-        if self._dbroot != self._preferred_dbroot:
2467fa
+        if self._dbroot != self._default_dbroot:
2467fa
             try:
2467fa
-                fwrite(dbroot_path, self._preferred_dbroot+"\n")
2467fa
+                fwrite(dbroot_path, self._default_dbroot+"\n")
2467fa
             except:
2467fa
-                if not os.path.isdir(self._preferred_dbroot):
2467fa
+                if not os.path.isdir(self._default_dbroot):
2467fa
                     raise RTSLibError("Cannot set dbroot to {}. Please check if this directory exists."
2467fa
-                                      .format(self._preferred_dbroot))
2467fa
+                                      .format(self._default_dbroot))
13ebeb
                 else:
13ebeb
                     # Writing to dbroot_path after devices have been registered will make the kernel emit this error:
13ebeb
                     # db_root: cannot be changed: target devices registered
13ebeb
                     from warnings import warn
13ebeb
                     warn("Cannot set dbroot to {}. Target devices have already been registered."
13ebeb
-                         .format(self._preferred_dbroot))
13ebeb
+                         .format(self._default_dbroot))
13ebeb
                     return
2467fa
 
13ebeb
             self._dbroot = fread(dbroot_path)