diff --git a/src/lib-sieve/sieve-interpreter.c b/src/lib-sieve/sieve-interpreter.c
index 9ee6c65939c082e6fe0593977c4657552d52c8d3..274e142d4616142cf6e0c8eda86c25e356919935 100644
--- a/src/lib-sieve/sieve-interpreter.c
+++ b/src/lib-sieve/sieve-interpreter.c
@@ -1003,8 +1003,8 @@ int sieve_interpreter_continue(struct sieve_interpreter *interp,
 		}
 		e_debug(e->event(), "Finished running script `%s' "
 			"(status=%s, resource usage: %s)",
-			sieve_execution_exitcode_to_str(ret),
 			sieve_binary_source(interp->runenv.sbin),
+			sieve_execution_exitcode_to_str(ret),
 			sieve_resource_usage_get_summary(&interp->rusage));
 		interp->running = FALSE;
 	}