diff --git a/modules/util/viirs_l1b_l2.py b/modules/util/viirs_l1b_l2.py
index e14c1d6cb253f13a5ea58516d80cb3f8c14850b1..5e2d0ea3c1d2fd9426fb73bd1e24e69deae95f37 100644
--- a/modules/util/viirs_l1b_l2.py
+++ b/modules/util/viirs_l1b_l2.py
@@ -96,7 +96,6 @@ def process_cld_prob_(grd_k):
     if np.sum(keep)/num_keep < 0.25:
         return None
     grd_k = np.where(np.invert(keep), 0, grd_k)
-    # grd_k = np.where(grd_k < 0.5, 0.0, 1.0)
     return grd_k
 
 
@@ -148,9 +147,6 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
             #     data_h5f.close()
             #     continue
 
-            data_tiles = []
-            label_tiles = []
-
             try:
                 run(data_h5f, data_params, data_train_tiles, data_valid_tiles, num_keep_x_tiles=num_keep_x_tiles, tile_width=128, kernel_size=11, day_night=day_night)
                 # run(data_h5f, label_params, label_data_tiles, label_valid_tiles, tile_width=128, kernel_size=7, day_night=day_night)
@@ -160,6 +156,7 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
                 # label_h5f.close()
                 continue
             print(data_f)
+            f_cnt += 1
 
             data_h5f.close()
             # label_h5f.close()
@@ -167,7 +164,6 @@ def run_all(directory, out_directory, day_night='ANY', start=10):
             if len(data_train_tiles) == 0:
                 continue
 
-            f_cnt += 1
             if (f_cnt % 5) == 0:
                 num_valid_samples = 0
                 if len(data_valid_tiles) > 0: