Added EventSending and EventSent events to allow pre and post processing
Exceptions while flushing should not kill the background task