better f::write