         # New directory detected
         .on 'addDir', (dirPath) =>
             if not @watchingLocked
-                if path isnt remoteConfig.path
+                if dirPath isnt remoteConfig.path
                     #log.info "Directory added: #{dirPath}"
                     log.info "Directory added: #{dirPath}"
                     @createDirectoryDoc dirPath, ->
+
+        # File deletion detected
+        .on 'unlink', (filePath) =>
+            log.info "File deleted: #{filePath}"
+            @changes.push { operation: 'delete', file: filePath }, ->
+
+        # Folder deletion detected
+        .on 'unlinkDir', (dirPath) =>
+            log.info "Folder deleted: #{dirPath}"
+            @changes.push { operation: 'delete', file: dirPath }, ->
 
         # File update detected
         .on 'change', (filePath) =>

                    saveBinaryDocument newDoc

        updateFileInformation = (existingDoc, newDoc) ->
            newDoc._id = existingDoc._id
            newDoc._rev = existingDoc._rev
            newDoc.creationDate = existingDoc.creationDate

                # Do not throw error
                callback null
            else
                # We pass the new document through every local functions
                createParentDirectory
                    _id: uuid.v4().split('-').join('')
                    docType: 'File'
