Changing to filereadable to isdirectory