Rewrite the way to load from file to db.