read and write inode