Fix autodiscovery, replace deprecated .warn with .warning