fixed wrong isDirectory() -> isDir() replacement