more robust error checking on read and write data