better to use file-accessible-directory-p instead of file-directory-p