diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
index 3a8f7bd..4a8bcce 100644
--- a/src/corelib/io/qfilesystemwatcher.cpp
+++ b/src/corelib/io/qfilesystemwatcher.cpp
@@ -374,10 +374,14 @@ QStringList QFileSystemWatcher::removePaths(const QStringList &paths)
         return QStringList();
     }
 
-    if (d->native)
+    if (d->native) {
+        qDebug() << __FUNCTION__ << "native";
         p = d->native->removePaths(p, &d->files, &d->directories);
-    if (d->poller)
+    }
+    if (d->poller) {
+        qDebug() << __FUNCTION__ << "poller";
         p = d->poller->removePaths(p, &d->files, &d->directories);
+    }
 
     return p;
 }
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 039992a..3dc8a3c 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -48,7 +48,7 @@
 
 QT_BEGIN_NAMESPACE
 
-// #define WINQFSW_DEBUG
+#define WINQFSW_DEBUG
 #ifdef WINQFSW_DEBUG
 #  define DEBUG qDebug
 #else
@@ -103,6 +103,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
         DEBUG() << "Looking for a thread/handle for" << normalPath;
 
         const QString absolutePath = isDir ? fileInfo.absoluteFilePath() : fileInfo.absolutePath();
+        qDebug() << __FUNCTION__ << "absolutePath=" << absolutePath << "normalPath=" <<normalPath;
         const uint flags = isDir
                            ? (FILE_NOTIFY_CHANGE_DIR_NAME
                               | FILE_NOTIFY_CHANGE_FILE_NAME)
@@ -131,7 +132,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
             handle = thread->handleForDir.value(QFileSystemWatcherPathKey(absolutePath));
             if (handle.handle != INVALID_HANDLE_VALUE && handle.flags == flags) {
                 // found a thread now insert...
-                DEBUG() << "Found a thread" << thread;
+                DEBUG() << "Found a thread" << thread << absolutePath;
 
                 QWindowsFileSystemWatcherEngineThread::PathInfoHash &h =
                     thread->pathInfoForHandle[handle.handle];
@@ -186,7 +187,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
             }
             if (!found) {
                 QWindowsFileSystemWatcherEngineThread *thread = new QWindowsFileSystemWatcherEngineThread();
-                DEBUG() << "  ###Creating new thread" << thread << "(" << (threads.count()+1) << "threads)";
+                DEBUG() << "  ###Creating new thread" << thread << absolutePath << "(" << (threads.count()+1) << "threads)";
                 thread->handles.append(handle.handle);
                 thread->handleForDir.insert(QFileSystemWatcherPathKey(absolutePath), handle);
 
@@ -236,15 +237,20 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
             QMutexLocker locker(&(thread->mutex));
 
             QWindowsFileSystemWatcherEngine::Handle handle = thread->handleForDir.value(QFileSystemWatcherPathKey(absolutePath));
+            qDebug() << "handle.handle1" << handle.handle << "absolutePath=" << absolutePath;
             if (handle.handle == INVALID_HANDLE_VALUE) {
                 // perhaps path is a file?
                 absolutePath = fileInfo.absolutePath();
                 handle = thread->handleForDir.value(QFileSystemWatcherPathKey(absolutePath));
+                qDebug() << "handle.handle2" << handle.handle << "absolutePath=" << absolutePath;
             }
             if (handle.handle != INVALID_HANDLE_VALUE) {
                 QWindowsFileSystemWatcherEngineThread::PathInfoHash &h =
                         thread->pathInfoForHandle[handle.handle];
-                if (h.remove(QFileSystemWatcherPathKey(fileInfo.absoluteFilePath()))) {
+                qDebug() << "PathInfoHash=" << h.size();
+                bool rc = h.remove(QFileSystemWatcherPathKey(fileInfo.absoluteFilePath()));
+                qDebug() << "h.remove" << rc << fileInfo.absoluteFilePath();
+                if (rc) {
                     // ###
                     files->removeAll(path);
                     directories->removeAll(path);
@@ -260,6 +266,7 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
                         thread->handleForDir.remove(QFileSystemWatcherPathKey(absolutePath));
                         // h is now invalid
 
+                        qDebug() << "h.isEmpty(), calling it.remove()";
                         it.remove();
 
                         if (thread->handleForDir.isEmpty()) {
@@ -290,6 +297,7 @@ QStringList QWindowsFileSystemWatcherEngine::removePaths(const QStringList &path
     }
 
     threads.removeAll(0);
+    DEBUG() << "removePaths returns" << paths;
     return p;
 }
 
