handle error with path resolving