catching ^C signal