Added writetoEventLog extension