Maybe tape your headlight?
I did not see this coming.
Last week I was riding to work about an hour before sunrise along some very quiet rural roads with about 6 more miles to go. One of very few cars turned onto the road with brights a-blazin' so I went to signal a request to off their brights. I've been signaling to cars a few weeks now with very limited results by putting my hand in front of my light and removing it a few times, giving an off/on effect.
This time my hand barely brushed the headlight and the twist-on front (which holds the LEDs, like a flashlight) went flying off and to my right. This is one more reason for me to get a 2nd headlight. I'm using a Planet Bike Beamer 3 and its twist top to the battery compartment has very little twist to it before it comes off. I could not locate the parts and pieces of my headlight so I marked the spot on the side of the road and pedaled the remaining six miles in the dark.
Later I found everything but one battery and the light still works. Now I've got it taped so it doesn't come loose unexpectedly.