Move isDirectory up