ILLHIN illegal location for a hierarchical name(in a package) when accessing testbench top variable to uvm sequence

module top();
import uvm_pkg::*;
`include “file_tb_env.sv”

string dir_name;

initial begin
if (!$value$plusargs(“DIRNAME=%s”, dir_name)
uvm_report_info(“CHECK_DIR”,$psprintf(“No $value$plusarg +DIRNAME passed in.”), UVM_HIGH);
else
uvm_report_info(“CHECK_DIR”,$psprintf(“Received $value$plusarg +DIRNAME.”), UVM_HIGH);
end
endmodule

class file_seq extends uvm_sequence #(file_uvc_transaction);
function new(string name=“file_seq”);
super.new(name);
endfunction

// Sequence body definition
virtual task body();
//(E)
uvm_report_info(“CHECK_DIR”,$psprintf(“Received $value$plusarg +DIRNAME=%0s. in seq lib”, top.dir_name), UVM_NONE);
endtask
endclass
irun command line : irun +DIRNAME=/home/xx
The compile error is on (E), illegal location for a hierarchical name(in a package). I’ve tried with $root, no luck.