updated pingc.py with debug print method