Fixing addDir method