exec close() function when Ctrl + C is hit.