changed error with directory