bug with ifstream using string corrected by adding .c_str()