Add missing writeEnd calls Summary: When flush is called this also should be Reviewed By: aditya Test Plan: Use w/ PipedTransport. Should writeEnd() when an exception is thrown