Implement partially read and write