find_hook(): refactor the `STRIP_EXTENSION` logic