Add explicit cast from ifstream to bool to fix compile error