Add interrupt handler

Prints out current solution
or terminates the program if invoked twice