Implemented SIGINT handler for printing history