When I open a file using ifstream, the open sometimes fails. I use fail() to detect this. But I want to know why it failed and fail() only returns a dumb "yes" or "no". Is there a way to find out?