The program carries out the algorithm without crashing

The output prints characters that don't have corresponding
charecters. The program should print to a file instead of to the
screen.