Rename materials by directory

Hi all!
I’m trying to rename materials in Revit families by directory, but I don’t know why it fails. When I set current family instead of a directory it works just fine. Any ideas on how to make it work?
I’m using Orchid and Clockwork nodes.
Without List.Flatten nodes it doesn’t work either.