fix a bug in file.dir