Index: trunk/src/python/unifiedlogger/cad_watcher.py
===================================================================
--- trunk/src/python/unifiedlogger/cad_watcher.py	(revision 466)
+++ trunk/src/python/unifiedlogger/cad_watcher.py	(revision 467)
@@ -1,3 +1,3 @@
-import json, time, ConfigParser
+import json, time, ConfigParser, os
 from copy import deepcopy
 
@@ -18,21 +18,4 @@
     return not isEmpty(cmsitem)
 
-# Read the cad comments log 
-def readFile():
-    # get path to input file from configuration
-    config = ConfigParser.ConfigParser()
-    config.read('config/logging_service.cfg')
-    logfilepath  = config.get('Paths', 'UnifiedLogPath')
-    
-    lines = []
-    try:
-        text_file = open(logfilepath + "CADcomments.log", "r")
-    except IOError:
-        print "Error: missing "+logfilepath+"CADcomments.log file."
-    else:
-        lines = text_file.read().split('\n')
-        text_file.close()    
-    return lines
-    
 def setup():
     lastLineNum = 0
@@ -42,9 +25,36 @@
 def getLogEntries():
     global lastLineNum
-    msgList = readFile()
-    currList = []
-    currList = msgList[lastLineNum:]    # new items since last file read
-    lastLineNum = len(msgList)-1
-    return currList
+    # get path to input file from configuration
+    config = ConfigParser.ConfigParser()
+    config.read('config/logging_service.cfg')
+    logfilepath  = config.get('Paths', 'UnifiedLogPath')
+    pathToLog = logfilepath + "CADcomments.log"
+    
+    try:
+        text_file = open(pathToLog, "r")
+    except IOError as ex:
+        if ex.errno == 2:
+            # 'No such file or directory
+            print pathToLog + " missing: assuming reset"
+            lastLineNum = 0   #Start over
+            return []
+        else:
+            print "IOError reading "+pathToLog+" file."
+            print "errno: ",ex.errno
+            
+    else:
+        # Check file size
+        fileSize = os.path.getsize(pathToLog)
+        if fileSize == 0:
+            # Assume this is a read sync problem: Don't modify lastLineNum
+            print pathToLog+" is empty."
+            return []
+        else: # file is good, read it.
+            msgList = text_file.read().split('\n')
+            text_file.close()
+            currList = []
+            currList = msgList[lastLineNum:] # new items since last file read
+            lastLineNum = len(msgList)-1
+            return currList
 
 # Local main for unit testing
Index: trunk/src/python/unifiedlogger/wing_project.wpr
===================================================================
--- trunk/src/python/unifiedlogger/wing_project.wpr	(revision 466)
+++ trunk/src/python/unifiedlogger/wing_project.wpr	(revision 467)
@@ -85,5 +85,5 @@
         'current_pages': [3,
                           1],
-        'notebook_display': 'normal',
+        'notebook_display': 'hidden',
         'notebook_percent': 0.30000000000000004,
         'override_title': None,
@@ -187,5 +187,5 @@
                             20)],
          'code-line': '                trimmed_item = item.strip()\n',
-         'first-line': 39L,
+         'first-line': 50L,
          'folded-linenos': [],
          'sel-line': 57L,
@@ -194,29 +194,5 @@
          'selection_start': 1955L,
          'zoom': 0L},
-        1563915837.345044],
-        [loc('activitylog_watcher.py'),
-         {'attrib-starts': [('getLogEntries|0|',
-                             42)],
-          'code-line': '    return currList\n',
-          'first-line': 37L,
-          'folded-linenos': [],
-          'sel-line': 48L,
-          'sel-line-start': 1427L,
-          'selection_end': 1427L,
-          'selection_start': 1427L,
-          'zoom': 0L},
-         1563915839.151954],
-        [loc('logging_service.py'),
-         {'attrib-starts': [('startup|0|',
-                             20)],
-          'code-line': '                trimmed_item = item.strip()\n',
-          'first-line': 50L,
-          'folded-linenos': [],
-          'sel-line': 57L,
-          'sel-line-start': 1955L,
-          'selection_end': 1955L,
-          'selection_start': 1955L,
-          'zoom': 0L},
-         1563915884.294776],
+        1563915884.294776],
         [loc('activitylog_watcher.py'),
          {'attrib-starts': [('getLogEntries|0|',
@@ -423,5 +399,29 @@
           'selection_start': 1851L,
           'zoom': 0L},
-         1564189539.194298]],
+         1564189539.194298],
+        [loc('cad_watcher.py'),
+         {'attrib-starts': [('setup|0|',
+                             41)],
+          'code-line': 'def setup():\n',
+          'first-line': 24L,
+          'folded-linenos': [],
+          'sel-line': 41L,
+          'sel-line-start': 1329L,
+          'selection_end': 1329L,
+          'selection_start': 1329L,
+          'zoom': 0L},
+         1564287471.970187],
+        [loc('../../../../../../../../usr/lib/python2.7/genericpath.py'),
+         {'attrib-starts': [('getsize|0|',
+                             54)],
+          'code-line': '    return os.stat(filename).st_size\n',
+          'first-line': 39L,
+          'folded-linenos': [],
+          'sel-line': 56L,
+          'sel-line-start': 1506L,
+          'selection_end': 1506L,
+          'selection_start': 1506L,
+          'zoom': 0L},
+         1564287481.404096]],
         20),
         'current-loc': loc('cad_watcher.py'),
@@ -438,12 +438,14 @@
                                 'zoom': 0L}),
                               (loc('cad_watcher.py'),
-                               {'attrib-starts': [],
-                                'code-line': 'lastLineNum = 0\n',
-                                'first-line': 33L,
+                               {'attrib-starts': [('getLogEntries|0|',
+        24)],
+                                'code-line': "            msgList = text_fil"\
+        "e.read().split('\\n')\n",
+                                'first-line': 29L,
                                 'folded-linenos': [],
-                                'sel-line': 11L,
-                                'sel-line-start': 417L,
-                                'selection_end': 432L,
-                                'selection_start': 432L,
+                                'sel-line': 52L,
+                                'sel-line-start': 1613L,
+                                'selection_end': 1613L,
+                                'selection_start': 1613L,
                                 'zoom': 0L}),
                               (loc('cms_watcher.py'),
@@ -500,7 +502,7 @@
          loc('__main__.py')]),
                                'open_files': [u'../../../config/logging_service.cfg',
+        u'__main__.py',
         u'activitylog_watcher.py',
         u'cms_watcher.py',
-        u'__main__.py',
         u'logging_service.py',
         u'cad_watcher.py']},
@@ -511,5 +513,5 @@
         'traversal_pos': ((0,
                            3),
-                          1564183253.966105),
+                          1564287665.60169),
         'user_data': {}},
                  'saved_notebook_display': None,
@@ -519,5 +521,5 @@
                  'traversal_pos': ((0,
                                     4),
-                                   1564183317.08295),
+                                   1564289756.891358),
                  'user_data': {}},
         'window-alloc': (29,
@@ -575,4 +577,15 @@
         'selection_start': 22028L,
         'zoom': 0L},
+                       loc('../../../../../../../../usr/lib/python2.7/genericpath.py'): {'a'\
+        'ttrib-starts': [('getsize|0|',
+                          54)],
+        'code-line': '    return os.stat(filename).st_size\n',
+        'first-line': 39L,
+        'folded-linenos': [],
+        'sel-line': 56L,
+        'sel-line-start': 1506L,
+        'selection_end': 1506L,
+        'selection_start': 1506L,
+        'zoom': 0L},
                        loc('../../../../../../../../usr/lib/python2.7/json/decoder.py'): {'a'\
         'ttrib-starts': [('JSONDecoder|0|',
