force test case failure if file cannot be written

[test][extended:cartridge]