Fix read next packet

Improve extracting process from InputFile
Oh yes, indeed !