fix dir of root file in some macro