diff --git a/backend/src/app/srepl/helpers.clj b/backend/src/app/srepl/helpers.clj
index ba98c2968..9df761db0 100644
--- a/backend/src/app/srepl/helpers.clj
+++ b/backend/src/app/srepl/helpers.clj
@@ -168,7 +168,7 @@
                 (update-fn file libs opts)
                 (update-fn file opts))]
 
-    (when (and (some? file)
+    (when (and (some? file')
                (not (identical? file file')))
       (when validate? (cfv/validate-file-schema! file'))
       (let [file' (update file' :revn inc)]
diff --git a/backend/src/app/srepl/main.clj b/backend/src/app/srepl/main.clj
index 16e9a0905..9851af8a3 100644
--- a/backend/src/app/srepl/main.clj
+++ b/backend/src/app/srepl/main.clj
@@ -380,9 +380,6 @@
   "Apply a function to all files in the database, reading them in
   batches. Do not change data.
 
-  The `on-file` parameter should be a function that receives the file
-  and the previous state and returns the new state.
-
   Emits rollback at the end of operation."
   [on-file & {:keys [max-items start-at with-libraries?]}]
   (letfn [(get-candidates [conn]