Run cleanup function when receiving ^C signal.

 read more »