log error or warning when injection field as wrong modifiers