prevent deep recursion on failed writes: throw immediately