Fixed bug

Fixed Ctrl+C to halt the program causing a "Couldn't open file" error
when reading from a file