The comment says the directory is created on the local shard only, but when this code was converted, it ended up being moved inside the invoke_on_all lambda, which means now it is called from all shards. Fix it by reorganizing the code. Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>