diff --git a/filesystemwatcher/filesystemwatcher.cpp b/filesystemwatcher/filesystemwatcher.cpp
index bab6a33..3184cd9 100644
--- a/filesystemwatcher/filesystemwatcher.cpp
+++ b/filesystemwatcher/filesystemwatcher.cpp
@@ -49,13 +49,44 @@
     // scan directory and populate file list
     QHash<QString, sFileInfo> currentState = scanDirectory(m_dirPath);
 
-    QStringList dirChanges = reconcileDirectory(currentState);
+    // reconcile directory and report changes
+    QVector<sEventInfo> dirChanges = reconcileDirectory(currentState);
 
     // update gui with list of changes in this directory
     qDebug() << endl << m_watcher->directories() << endl;
 
+    // DEBUG: Print to Gui
     if(!dirChanges.isEmpty())
-        m_listViewModel->setStringList(dirChanges);
+    {
+        QStringList dirChangesList;
+
+        for(int i = 0; i < dirChanges.size(); i++)
+        {
+            QString tempString;
+
+            eEvent event = dirChanges[i].event;
+            QString absFilePath = dirChanges[i].absFilePath;
+
+            switch(event)
+            {
+            case ADDED:
+                tempString.append("ADDED: ");
+                break;
+            case MODIFIED:
+                tempString.append("MODIFIED: ");
+                break;
+            case DELETED:
+                tempString.append("DELETED: ");
+                break;
+            }
+
+            tempString.append(absFilePath);
+
+            dirChangesList.append(tempString);
+        }
+
+        m_listViewModel->setStringList(dirChangesList);
+    }
 }
 
 QHash<QString, sFileInfo> FileSystemWatcher::scanDirectory(QString dirPath)
@@ -123,13 +154,14 @@
     return currentState;
 }
 
-QStringList FileSystemWatcher::reconcileDirectory(QHash<QString, sFileInfo> currentState)
+QVector<sEventInfo> FileSystemWatcher::reconcileDirectory(QHash<QString, sFileInfo> currentState)
 {
     // list of files changed
-    QStringList dirChanges;
+    QVector<sEventInfo> dirChanges;
 
     // compare result (database/stored snapshot) to fileList (current snapshot)
     QMutableHashIterator<QString, sFileInfo> i(m_storedState);
+
     while(i.hasNext())
     {
         i.next();
@@ -153,7 +185,10 @@
                 i.setValue(currentFileInfoStruct);
 
                 // this file has been modified
-                dirChanges.append(absFilePath);
+                sEventInfo eventInfo;
+                eventInfo.event = MODIFIED;
+                eventInfo.absFilePath = absFilePath;
+                dirChanges.push_back(eventInfo);
             }
 
             // delete this file from fileList we have processed it
@@ -165,7 +200,10 @@
             i.remove();
 
             // this file has been deleted
-            dirChanges.append(absFilePath);
+            sEventInfo eventInfo;
+            eventInfo.event = DELETED;
+            eventInfo.absFilePath = absFilePath;
+            dirChanges.push_back(eventInfo);
         }
     }
 
@@ -178,7 +216,10 @@
         m_storedState.insert(absFilePath, currentFileInfoStruct);
 
         // this file has been added
-        dirChanges.append(absFilePath);
+        sEventInfo eventInfo;
+        eventInfo.event = ADDED;
+        eventInfo.absFilePath = absFilePath;
+        dirChanges.push_back(eventInfo);
     }
 
     return dirChanges;
diff --git a/filesystemwatcher/filesystemwatcher.h b/filesystemwatcher/filesystemwatcher.h
index 5891d6c..1e17524 100644
--- a/filesystemwatcher/filesystemwatcher.h
+++ b/filesystemwatcher/filesystemwatcher.h
@@ -9,6 +9,18 @@
 #include <QDebug>
 #include <QHash>
 #include <QCryptographicHash>
+#include <QVector>
+
+enum eEvent {
+    ADDED = 0,
+    MODIFIED,
+    DELETED
+};
+
+struct sEventInfo {
+    eEvent event;
+    QString absFilePath;
+};
 
 struct sFileInfo {
     QByteArray hash;
@@ -39,7 +51,7 @@
     QHash<QString, sFileInfo> scanDirectory(QString filePath);
 
     // reconcile directory, find changes
-    QStringList reconcileDirectory(QHash<QString, sFileInfo> fileList);
+    QVector<sEventInfo> reconcileDirectory(QHash<QString, sFileInfo> fileList);
 
 private:
     Ui::FileSystemWatcher* m_ui; // user interface
