Use ifstream instead of fstream