logging permission check in debug