Adds KeyboardInterrupt support