horrible mess to support multiple dirs in cowpath