Use block_exists() instead of stat_block() in do_write_chuck().