         filePaths = filesystem.getPaths filePath
         doc = {}
 
-        async.waterfall [
-
-            # Check that the file exists and is located in the sync directory
-            (next) ->
-                filesystem.checkLocation filePaths.absolute, next
-
-            # Ensure that its parent directory exists
-            (next) ->
-                return next() if filePaths.parent is ''
-                operationQueue.createFolderRemotely filePaths.absParent, next
-
-            # Make a doc from scratch or by merging with an existing one
-            (next) ->
-                pouch.makeFileDoc filePaths.absolute, next
-
-            # Upload the binary as a CouchDB document's attachment and return
-            # the binary document
-            (fileDoc, next) ->
-                doc = fileDoc
-                pouch.uploadBinary filePaths.absolute
-                                 , fileDoc.binary
-                                 , next
-
-            # Update and save the file DB document that will be replicated
-            # afterward.
-            (binaryDoc, next) ->
-                doc.binary =
-                    file:
-                        id: binaryDoc.id
-                        rev: binaryDoc.rev
-                        checksum: binaryDoc.checksum
-
-                pouch.db.put doc, next
-
-            # Flag the revision of the document as 'made locally' to avoid
-            # further conflicts reapplicating changes
-            (res, next) ->
-                pouch.storeLocalRev res.rev, next
-
-        ], callback
+        # Check that the file exists and is located in the sync
+        # directory
+        filesystem.checkLocation filePaths.absolute, (err) ->
+            if err
+                pouch.files.get filePath, (err, doc) ->
+                    if doc?
+                        pouchd.db.remove doc, callback
+                    else
+                        callback err
+            else
+                async.waterfall [
+                    # Ensure that its parent directory exists
+                    (next) ->
+                        return next() if filePaths.parent is ''
+                        operationQueue.createFolderRemotely(
+                            filePaths.absParent, next)
+
+                    # Make a doc from scratch or by merging with an existing
+                    # one
+                    (next) ->
+                        pouch.makeFileDoc filePaths.absolute, next
+
+                    # Upload the binary as a CouchDB document's attachment and
+                    # return the binary document
+                    (fileDoc, next) ->
+                        doc = fileDoc
+                        pouch.uploadBinary filePaths.absolute
+                                         , fileDoc.binary
+                                         , (err) ->
+                            next()
+
+                    # Update and save the file DB document that will be
+                    # replicated afterward.
+                    (binaryDoc, next) ->
+                        doc.binary =
+                            file:
+                                id: binaryDoc.id
+                                rev: binaryDoc.rev
+                                checksum: binaryDoc.checksum
+
+                        pouch.db.put doc, next
+
+                    # Flag the revision of the document as 'made locally' to
+                    # avoid further conflicts reapplicating changes
+                    (res, next) ->
+                        pouch.storeLocalRev res.rev, next
+
+                ], callback
 
 
     createFolderRemotely: (folderPath, callback) ->

                    operationQueue.createFolderLocally doc, done
            , callback



    #
    # Local-to-remote operations
    #

            err = new Error "The doc is invalid: #{JSON.stringify doc}"
            callback err

        else if doc.path?.indexOf('undefined') >= 0
            pouch.db.remove doc, (err) ->
                err = new Error "The doc was invalid: #{JSON.stringify doc}"
                callback err
