checking if response is committed before flushing output stream