better debug output for flag changes