logging and fix ping out