     changes: async.queue applyOperation, 1
 
 
-    # Move a folder or a folder to a new location. The target is the path of
+    # Move a file or a folder to a new location. The target is the path of
     # the current doc. The source is the path of the previous revision of
     # the doc.
     # TODO write test for this function
     # TODO handle date modification
     moveEntryFromDoc: (doc, callback) ->
         pouch.getPreviousRev doc._id, (err, previousDocRev) ->
-            if err
+            if err and err.status isnt 404
                 log.error 'Cannot find previous revision'
                 log.error doc
                 callback err
+            else if err and err.status is 404
+                callback()
             else
                 newPath = path.join remoteConfig.path, doc.path, doc.name
                 previousPath = path.join(

        # fs module has some issues.
        # More info on https://github.com/paulmillr/chokidar
        watcher = chokidar.watch remoteConfig.path,
            ignored: /[\/\\]\./
            persistent: continuous
            ignoreInitial: fromNow

        # New file detected
        .on 'add', (filePath) =>

                        log.error err if err
                    callback()

                # That case handles files that have been overwritten remotely
                else if not isMoved and isDateChanged and isFile
                    log.info "File overwritten, need redownload: #{isFile}"

