Change handling of writting to event log for windows 8