Check for HDF5 existence using C++ ifstream trick