remove unreference var
print the directory with '/' end
refactor