Changed the logic to use a specified property rather than BuildConfig.DEBUG due to its inconsistency