added KeyboardInterrupt to twient.py