compile the logic to generate the file with path,parent,time,level,name