write inode bug fix