Need help with a custom Prometheus lua file

Hi, I'm trying to get my WAN / Public IP to show in Grafana.
I created a bash script to get my WAN IP / Public and dump it into a file called wanip.out (fake IP's below)

192.168.1.136 184.170.17.143

my lua file is as such:

local function scrape()
  local wantest = space_split(get_contents("/tmp/wanip.out"))
  metric("router_wan_ip", "gauge", nil, wantest[1])
  metric("router_public_ip", "gauge", nil, wantest[2])
end
return { scrape = scrape }

when I add this file to the router and restart Prometheus, Prometheus stops working. I check in the logs, but dont see much.