fix permission inversion bug
debug logging changes
addition of Permission debug log statements