Fix use of ifstream.