Removed is dir check since is file will return false on dir