2019R3 Builds damaged

I upgraded to 2019R3 on my iMac running High Sierra (10.13.6). Added some new features and upgraded some items to new 2019R3 methods on an app that has been around for a long time.
Debug works great. But when I build and try to launch get message that app is damaged.
Console log means nothing to me–

Jan 15 07:58:26 Tom-2 systemstats[76]: assertion failed: 17G10021: systemstats + 914800 [D1E75C38-62CE-3D77-9ED3-5F6D38EF0676]: 0x40

Anybody else seen this or have any ideas?

Upon reflection I thought to check the code that was inside

#if DebugBuild=False

Immediately I confirmed that this line was an issue–

AppReceiptVerificatorMBS.ExitApp 173

I am sure I can get to the bottom of this cause of the app quitting on launch. Not sure if this is the reason for the damaged app message I get sometimes.

AppReceiptVerificatorMBS.ExitApp 173 would cause the app to terminate immediately and the AppStore purchase authentication prompt would appear. I only use that code if the AppStore receipt fails to validate.

When checking the App Store Receipt, make sure that your application has been properly code signed with the App Store submission identity, otherwise it will fail, like what you’re seeing.