Extended: Added support for is-a-dir error.