Added function for handling sigint