readwrite: updating error injection code

Signed-off-by: Joe Buck <jbbuck@gmail.com>