Switching to fstream for readline.