Close ping at the start. Added some debugging.