Added .close() to the streams before quitting the program.