Added debug message for emergency_margin