debug and ping works with query param

There is still one bug if the ping dns does not exist. That could be
better handled