Try collecting the paths in a PathMap