fix: path.readdir and path.stat function returns error string.