check return of fopen in phGeomBC