Add debug logging to prove this actually works