Update index.js

Moved the progress check to not modify self.totalFileSize, but just compare against self.totalFileSize + counter.bytes.