diff --git a/NEWS b/NEWS
index 9420a6f9159eebad09df0146b38fad4bc29f3728..1a0b3062d8b597cda5246a901f0f67123f2bbfeb 100644
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,16 @@
+
+==================================================================================================
+Changes for X.X
+==================================================================================================
+- Bug Fix (472): Better framewriter error messages
+- Bug Fix (985): Fix daqd for single-machine framebuilder in kernel 3.2
+- Bug Fix (1010): Prevent divide-by-zero error in daqd filesys.hh
 ==================================================================================================
 Changes for 3.0.2
 ==================================================================================================
 - Bug Fix to SUM.pm part connection checking.
 - Bug Fix to auto-generated ADC monitor screens. Screens for models which use several top level
   signal names were not being generated correctly.
-- Bug Fix (472): Better framewriter error messages
-- Bug Fix (985): Fix daqd for single-machine framebuilder in kernel 3.2
 ==================================================================================================
 Changes for 3.0.1
 ==================================================================================================
diff --git a/src/daqd/filesys.hh b/src/daqd/filesys.hh
index c0322eb9b7a0011b8fc9ec5cc9de5adee50da4cf..f2f6fcc9be326e85d2eae3d10182cbca6d4d06ae 100644
--- a/src/daqd/filesys.hh
+++ b/src/daqd/filesys.hh
@@ -395,8 +395,13 @@ static const int digits_in_dir = 5;
       dnum = cur_update_dir;
 
       // Switch to the next directory if current directory is full
-      if (dir [cur_update_dir].nfiles >= files_per_dir)
-        ++dnum %= num_dirs;
+      if (dir [cur_update_dir].nfiles >= files_per_dir) {
+        if ( num_dirs > 0 ) {
+          ++dnum %= num_dirs;
+        } else {
+	  ++dnum;
+        }
+      }
     }
 
 if (gps_time_dirs) {
@@ -445,8 +450,13 @@ if (gps_time_dirs) {
       dnum = cur_update_dir;
 
       // Switch to the next directory if current directory is full
-      if (dir [cur_update_dir].nfiles >= files_per_dir)
-	++dnum %= num_dirs;
+      if (dir [cur_update_dir].nfiles >= files_per_dir) {
+        if ( num_dirs > 0 ) {
+          ++dnum %= num_dirs;
+        } else {
+	  ++dnum;
+        }
+      }
     }
     
     _filename_dir (t, fname, dnum, framedt);