addDirectory fixed