filesystem bug fix & read dir