diff --git a/src/xfel_calibrate/finalize.py b/src/xfel_calibrate/finalize.py
index 8afc7212a4f02d2a66923b5ab7858ade88b0aafb..851296ae8498d170ca192240c92e24bd57a87208 100644
--- a/src/xfel_calibrate/finalize.py
+++ b/src/xfel_calibrate/finalize.py
@@ -1,4 +1,5 @@
 import re
+import sys
 from datetime import datetime
 from glob import glob
 from importlib.machinery import SourceFileLoader