use or instead of complicated if
ensure paths used as directories ends with a /