Add writer error handling test