Add some debug logging and change method of ssh execing