Changed (err error) for Writer.Close