Debug logging for permission issue