Adding code to detect APIs and Perms used in every method