Offload wget wait onto lua script