error dir to path