Trying to fix the dirent problem