deprecated write_error