Dinn' parse that substr as I should've done. Anyways the result of that substr is what should be added to $filetell, neither the length of the original string, nor the remainder. Sometimes a bug is spotted even without reading the whole surroundings (completely||correctly).