include error in log within safeguard