thread event context to make root-owned dirs in template path