Index: trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- trunk/psLib/src/sys/psLogMsg.c	(revision 23486)
+++ trunk/psLib/src/sys/psLogMsg.c	(revision 28404)
@@ -28,4 +28,5 @@
 #include <stdarg.h>
 #include <time.h>
+#include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -200,4 +201,10 @@
         return -1;
     }
+
+    if (lseek(fileD, 0, SEEK_END) == -1) {
+        psError(PS_ERR_IO, true, "Could not seek to end of file %s", dest);
+        return -1;
+    }
+
     return fileD;
 }
