Switched cEvent to use strerror_r for error messages