diff --git a/cmd/joj3/conf/conf.go b/cmd/joj3/conf/conf.go
index eaaad3e..98477ac 100644
--- a/cmd/joj3/conf/conf.go
+++ b/cmd/joj3/conf/conf.go
@@ -14,6 +14,7 @@ import (
 	"time"
 
 	"github.com/go-git/go-git/v5"
+	"github.com/joint-online-judge/JOJ3/cmd/joj3/env"
 	"github.com/joint-online-judge/JOJ3/internal/stage"
 	"github.com/koding/multiconfig"
 )
@@ -169,6 +170,7 @@ func ParseConfFile(path string) (conf *Conf, err error) {
 		slog.Error("validate stages conf", "error", err)
 		return
 	}
+	env.Attr.ConfName = conf.Name
 	// TODO: remove the following backward compatibility codes
 	if len(conf.Stage.Stages) == 0 {
 		conf.Stage.SandboxExecServer = conf.SandboxExecServer
diff --git a/cmd/joj3/main.go b/cmd/joj3/main.go
index 30bea6a..d317a86 100644
--- a/cmd/joj3/main.go
+++ b/cmd/joj3/main.go
@@ -7,7 +7,6 @@ import (
 	"os"
 
 	"github.com/joint-online-judge/JOJ3/cmd/joj3/conf"
-	"github.com/joint-online-judge/JOJ3/cmd/joj3/env"
 	"github.com/joint-online-judge/JOJ3/cmd/joj3/stage"
 	"github.com/joint-online-judge/JOJ3/cmd/joj3/teapot"
 	internalStage "github.com/joint-online-judge/JOJ3/internal/stage"
@@ -87,7 +86,6 @@ func mainImpl() (err error) {
 		return err
 	}
 	slog.Debug("conf loaded", "conf", confObj)
-	env.Attr.ConfName = confObj.Name
 	if err := setupSlog(confObj.LogPath); err != nil { // after conf is loaded
 		slog.Error("setup slog", "error", err)
 		return err