Added test to make sure writer never gets closed