diff --git a/xbob/db/replay/models.py b/xbob/db/replay/models.py
index 3468e273d9051446219816250d24e6f6bf4d267f..fa1fd8ec5fd65d7511c3a918d1984cb3cfc12e64 100644
--- a/xbob/db/replay/models.py
+++ b/xbob/db/replay/models.py
@@ -89,7 +89,7 @@ class File(Base):
     if not directory: directory = ''
     if not extension: extension = ''
 
-    return os.path.join(directory, self.path + extension)
+    return str(os.path.join(directory, self.path + extension))
 
   def videofile(self, directory=None):
     """Returns the path to the database video file for this object
@@ -182,7 +182,7 @@ class File(Base):
     """
 
     path = self.make_path(directory, extension)
-    bob.utils.makedirs_safe(os.path.dirname(path))
+    bob.db.utils.makedirs_safe(os.path.dirname(path))
     bob.io.save(data, path)
 
 # Intermediate mapping from RealAccess's to Protocol's