Only remove document backup if writing failed