diff --git a/lib/config.py b/lib/config.py
index 2e3a4f21cf01ac9399249c8e57a0c17e3b7ecef5..7ebcf920b02b296c0d08c8f6a1490b7b00551552 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -1070,7 +1070,7 @@ class ConfigWriter:
       msg = to_result.RemoteFailMsg()
       if msg:
         msg = ("Copy of file %s to node %s failed: %s" %
-                (self._cfg_file, node, msg))
+               (self._cfg_file, to_node, msg))
         logging.error(msg)
         bad = True
     return not bad