make casts in FileRead.cpp explicit