adding pre-conditions for debug logs