Fix read next packet

Improve extracting process from InputFile
@return if next packet was read successfully