Use local variable to avoid recomputing relativePath + entries[i]