Fix bug of file stat updating