Fix an issue in StoreChannel.writeAll() where bytes written was not checked.