Added check to ensure option is a number, and handled keyboard interrupt.