Added io checks when writing checksum into rdb.

Check for io errors when writing the checksum to an rdb.