fix leak of OutputWriters during validation