diff --git a/gui/fs-watcher.cc b/gui/fs-watcher.cc
index 94c6b3f..7eff410 100644
--- a/gui/fs-watcher.cc
+++ b/gui/fs-watcher.cc
@@ -35,6 +35,7 @@
 
 FsWatcher::FsWatcher (QString dirPath,
                       LocalFile_Change_Callback onChange, LocalFile_Change_Callback onDelete,
+                      FileState *fileState,
                       QObject* parent)
   : QObject(parent)
   , m_watcher (new QFileSystemWatcher())
@@ -42,6 +43,7 @@
   , m_dirPath (dirPath)
   , m_onChange (onChange)
   , m_onDelete (onDelete)
+  , m_fileState (fileState)
 {
   _LOG_DEBUG ("Monitor dir: " << m_dirPath.toStdString ());
   // add main directory to monitor
@@ -54,8 +56,12 @@
 
   m_scheduler->start ();
 
-  Scheduler::scheduleOneTimeTask (m_scheduler, 0.1,
-                                  bind (&FsWatcher::ScanDirectory_Notify_Execute, this, m_dirPath),
+  Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
+                                  bind (&FsWatcher::ScanDirectory_NotifyRemovals_Execute, this, m_dirPath),
+                                  "r-" + m_dirPath.toStdString ()); // only one task will be scheduled per directory
+
+  Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
+                                  bind (&FsWatcher::ScanDirectory_NotifyUpdates_Execute, this, m_dirPath),
                                   m_dirPath.toStdString ()); // only one task will be scheduled per directory
 }
 
@@ -69,10 +75,23 @@
 {
   _LOG_DEBUG ("Triggered DirPath: " << dirPath.toStdString ());
 
-  // m_executor.execute (bind (&FsWatcher::ScanDirectory_Notify_Execute, this, dirPath));
-  Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
-                                  bind (&FsWatcher::ScanDirectory_Notify_Execute, this, dirPath),
-                                  dirPath.toStdString ()); // only one task will be scheduled per directory
+  filesystem::path absPathTriggeredDir (dirPath.toStdString ());
+  dirPath.remove (0, m_dirPath.size ());
+
+  filesystem::path triggeredDir (dirPath.toStdString ());
+  if (!filesystem::exists (filesystem::path (absPathTriggeredDir)))
+    {
+      Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
+                                      bind (&FsWatcher::ScanDirectory_NotifyRemovals_Execute, this, dirPath),
+                                      "r-" + dirPath.toStdString ()); // only one task will be scheduled per directory
+    }
+  else
+    {
+      // m_executor.execute (bind (&FsWatcher::ScanDirectory_NotifyUpdates_Execute, this, dirPath));
+      Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
+                                      bind (&FsWatcher::ScanDirectory_NotifyUpdates_Execute, this, dirPath),
+                                      dirPath.toStdString ()); // only one task will be scheduled per directory
+    }
 }
 
 void
@@ -103,13 +122,15 @@
 
       Scheduler::scheduleOneTimeTask (m_scheduler, 0.5,
                                       bind (m_onDelete, triggeredFile.relative_path ()),
-                                      triggeredFile.relative_path ().string());
+                                      "r-" + triggeredFile.relative_path ().string());
     }
 }
 
 void
-FsWatcher::ScanDirectory_Notify_Execute (QString dirPath)
+FsWatcher::ScanDirectory_NotifyUpdates_Execute (QString dirPath)
 {
+  // _LOG_TRACE (" >> ScanDirectory_NotifyUpdates_Execute");
+
   // exclude working only on last component, not the full path; iterating through all directories, even excluded from monitoring
   QRegExp exclude ("^(\\.|\\.\\.|\\.chronoshare|.*~|.*\\.swp)$");
 
@@ -139,25 +160,6 @@
             {
               DidFileChanged (absFilePath);
             }
-          // // if this is a directory
-          // if(fileInfo.isDir())
-          //   {
-          //     QStringList dirList = m_watcher->directories();
-
-          //     // if the directory is not already being watched
-          //     if (absFilePath.startsWith(m_dirPath) && !dirList.contains(absFilePath))
-          //       {
-          //         _LOG_DEBUG ("Add new dir to watchlist: " << absFilePath.toStdString ());
-          //         // add this directory to the watch list
-          //         m_watcher->addPath(absFilePath);
-          //       }
-          //   }
-          // else
-          //   {
-          //     _LOG_DEBUG ("Found file: " << absFilePath.toStdString ());
-          //     // add this file to the file list
-          //     // currentState.insert(absFilePath, fileInfo.created().toMSecsSinceEpoch());
-          //   }
         }
       else
         {
@@ -166,6 +168,31 @@
     }
 }
 
+
+void
+FsWatcher::ScanDirectory_NotifyRemovals_Execute (QString dirPath)
+{
+  _LOG_DEBUG ("Triggered DirPath: " << dirPath.toStdString ());
+
+  filesystem::path absPathTriggeredDir (dirPath.toStdString ());
+  dirPath.remove (0, m_dirPath.size ());
+
+  filesystem::path triggeredDir (dirPath.toStdString ());
+
+  FileItemsPtr files = m_fileState->LookupFilesInFolderRecursively (triggeredDir.generic_string ());
+  for (std::list<FileItem>::iterator file = files->begin (); file != files->end (); file ++)
+    {
+      filesystem::path testFile = filesystem::path (m_dirPath.toStdString ()) / file->filename ();
+      _LOG_DEBUG ("Check file for deletion [" << testFile.generic_string () << "]");
+
+      if (!filesystem::exists (testFile))
+        {
+          _LOG_DEBUG ("Notifying about removed file [" << file->filename () << "]");
+          m_onDelete (file->filename ());
+        }
+    }
+}
+
 // std::vector<sEventInfo> FsWatcher::reconcileDirectory(QHash<QString, qint64> currentState, QString dirPath)
 // {
 //   // list of files changed
