diff --git a/src/cal_tools/agipdlib.py b/src/cal_tools/agipdlib.py
index 2fc5d08eb02ff16564747a3d0b081451c26ac98b..563750c64caba4488dd85a0b4f4e85d9a4196955 100644
--- a/src/cal_tools/agipdlib.py
+++ b/src/cal_tools/agipdlib.py
@@ -28,7 +28,7 @@ from cal_tools.agipdutils import (
 )
 from cal_tools.enums import AgipdGainMode, BadPixels, SnowResolution
 from cal_tools.h5_copy_except import h5_copy_except_paths
-from warnings import warn
+from logging import warning
 
 @dataclass
 class AgipdCtrl:
@@ -1057,10 +1057,10 @@ class AgipdCorrections:
         # This correction is disabled in case CS gain correction is selected.
         if self.corr_bools.get("adjust_mg_baseline"):
             if self.corr_bools.get("rel_gain") == "CS":
-                warn(
-                    "`adjust_mg_baseline` correction is not allowed with"
-                    " Current Source correction."
-                    " Skipping `adjust_mg_baseline` correction step")
+                warning(
+                    "Currently, `adjust_mg_baseline` correction"
+                    " is not allowed with Current Source gain correction."
+                    " Skipping `adjust_mg_baseline` correction step.")
             else:  # self.corr_bools.get("rel_gain") is in ["PC", "off"]
                 mgbc = self.md_additional_offset[module_idx][cellid, ...]
                 data[gain == 1] += mgbc[gain == 1]