diff --git a/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py b/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py
index fe429325a2c26880c1ed9cd790f8870bbec2bcf0..3b525ada886af0f7e7919092b5efc40622b9e42b 100644
--- a/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py
+++ b/MuonSpectrometer/MuonDetDescr/MuonAGDD/share/NSWAGDD_BlobProduction.py
@@ -1,11 +1,23 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
+try:
+    if muonLayout:
+        from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
+        GeoModelSvc = GeoModelSvc()
+        GeoModelSvc.MuonVersionOverride=muonLayout
+except NameError:
+    pass
+
 from MuonAGDD.MuonAGDDConfig import NSWAGDDTool
 NSWAGDDDumper = NSWAGDDTool(name="NSWAGDDDumper")
 NSWAGDDDumper.WriteAGDDFile=True # creates Out.AmdcOracle.AM.AGDDtemp.data and Out.AmdcOracle.AM.AGDD.PREsql
 NSWAGDDDumper.Locked=False
-NSWAGDDDumper.ReadAGDD=False # turn off reading from data base (true means read from DB)
-NSWAGDDDumper.XMLFiles=[input_nsw_xml]
+try:
+    if input_nsw_xml:
+        NSWAGDDDumper.ReadAGDD = False # turn off reading from data base (true means read from DB)
+        NSWAGDDDumper.XMLFiles=[input_nsw_xml]
+except NameError:
+    pass
 NSWAGDDDumper.Volumes=["NewSmallWheel"] # for the NSWAGDDTool volumes must always be given ("NewSmallWheel" usually includes everything)
 NSWAGDDDumper.DefaultDetector="Muon"