diff --git a/payload_consumer/snapshot_extent_writer.cc b/payload_consumer/snapshot_extent_writer.cc
index 5693c9b..c9e6f31 100644
--- a/payload_consumer/snapshot_extent_writer.cc
+++ b/payload_consumer/snapshot_extent_writer.cc
@@ -54,8 +54,14 @@
   const auto cur_extent_size = cur_extent.num_blocks() * block_size_;
 
   if (buffer_.empty() && count >= cur_extent_size) {
-    TEST_AND_RETURN_FALSE(cow_writer_->AddRawBlocks(
-        cur_extent.start_block(), data, cur_extent_size));
+    if (!cow_writer_->AddRawBlocks(
+            cur_extent.start_block(), data, cur_extent_size)) {
+      LOG(ERROR) << "AddRawBlocks(" << cur_extent.start_block() << ", " << data
+                 << ", " << cur_extent_size << ") failed.";
+      // return value is expected to be greater than 0. Return 0 to signal error
+      // condition
+      return 0;
+    }
     if (!next_extent()) {
       CHECK_EQ(count, cur_extent_size)
           << "Exhausted all blocks, but still have " << count - cur_extent_size
@@ -75,8 +81,12 @@
   CHECK_LE(buffer_.size(), cur_extent_size);
 
   if (buffer_.size() == cur_extent_size) {
-    TEST_AND_RETURN_FALSE(cow_writer_->AddRawBlocks(
-        cur_extent.start_block(), buffer_.data(), buffer_.size()));
+    if (!cow_writer_->AddRawBlocks(
+            cur_extent.start_block(), buffer_.data(), buffer_.size())) {
+      LOG(ERROR) << "AddRawBlocks(" << cur_extent.start_block() << ", "
+                 << buffer_.data() << ", " << buffer_.size() << ") failed.";
+      return 0;
+    }
     buffer_.clear();
     if (!next_extent()) {
       CHECK_EQ(count, bytes_to_copy) << "Exhausted all blocks, but still have "
@@ -100,6 +110,7 @@
   auto data = static_cast<const uint8_t*>(bytes);
   while (count > 0) {
     auto bytes_written = ConsumeWithBuffer(data, count);
+    TEST_AND_RETURN_FALSE(bytes_written > 0);
     data += bytes_written;
     count -= bytes_written;
   }
diff --git a/payload_consumer/snapshot_extent_writer.h b/payload_consumer/snapshot_extent_writer.h
index fb4b548..6d9fe7d 100644
--- a/payload_consumer/snapshot_extent_writer.h
+++ b/payload_consumer/snapshot_extent_writer.h
@@ -41,7 +41,7 @@
 
  private:
   bool next_extent();
-  size_t ConsumeWithBuffer(const uint8_t* bytes, size_t count);
+  [[nodiscard]] size_t ConsumeWithBuffer(const uint8_t* bytes, size_t count);
   // It's a non-owning pointer, because PartitionWriter owns the CowWruter. This
   // allows us to use a single instance of CowWriter for all operations applied
   // to the same partition.
