rhbz986145 Check for IO error after each write