adding a handler for CTRL C

Just adding a handler for CTRL C.  There's probably better ways to implement this.  So please advise.