The getRemainingBytes() has got some weird error, modified it to use m_file.size() and things are working well