better logging in defense.cs