Removed print statement and added KeyboardInterupt handling.