Switched from input and output strings to files.