diff --git a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb
index ed9be026cc110ea60fda78cc3f264a9223fa0293..bd1940cf30bb7be8fbae855ca848861e3b7d6f3c 100644
--- a/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb
+++ b/notebooks/Gotthard2/Correction_Gotthard2_NBC.ipynb
@@ -429,7 +429,12 @@
     "    # Select module INSTRUMENT sources and deselect empty trains.\n",
     "    dc = H5File(raw_file).select(data_sources, require_all=True)\n",
     "    n_trains = len(dc.train_ids)\n",
-    "    print(f\"Correcting {n_trains} for {raw_file}.\")\n",
+    "    \n",
+    "    if n_trains == 0:\n",
+    "        warning(f\"Skipping correction. No trains to correct for this sequence file: {raw_file}.\")\n",
+    "        continue\n",
+    "    else:\n",
+    "        print(f\"Correcting {n_trains} for {raw_file}.\")\n",
     "\n",
     "    # Initialize GH2 data and gain arrays to store in corrected files.\n",
     "    if gh2_detector == \"25um\":\n",