I too am on day 9 of anavar, the 9th dose being taken just a few hours ago. I am taking twice your dose tho and am on test e as well.
40mg is a pretty light dose from my understanding and I would be looking at other factors that might be causing your headaches. Caffeine, water intake, diet alterations, stress, sleep deprivation, and a host of others.
Anavar's half life is 9 hours or so, meaning you have it "stable" in your system in around 2 days time assuming you are taking it ED. If you are hell bent that it is the Var, try lowering the dose by half for a couple of days. I think you are going to find that it isn't the Anavar.
Just my 2 cents