Update readWrite.js