Changed flushResponse() - now throws exception, if headers could be sent