Added main thread ID check in Log::HandleEndFrame().