add argment function, add directory exist dealing