add file and dir mode