C++ fix for large file (SF5)