diff --git a/FofbTool.py b/FofbTool.py
index 22741f97db292626af132331394d2c9b430dea89..4f11ca7b9d776bed304192af82949d872f3be9c0 100755
--- a/FofbTool.py
+++ b/FofbTool.py
@@ -607,8 +607,8 @@ def fofbcommand_writeref(what='current'):
 
 def fofbcommand_writemat(filename='respmat.npy'):
 
-    fofbcommand["x_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load("respmat.npy")[50:], np.zeros((50,5))]).astype(int)
-    fofbcommand["y_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load("respmat.npy")[:50], np.zeros((50,5))]).astype(int)
+    fofbcommand["x_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load(filename)[50:], np.zeros((50,5))]).astype(int)
+    fofbcommand["y_inv_resp_mat"] = np.hstack([np.zeros((50, 1)), np.load(filename)[:50], np.zeros((50,5))]).astype(int)
 
 ###################################################################################################
 #