directory finding/creation fixed