Fixed sending extra packets after end of file
Merge pull request #11 from rkophs/edgeCases

Fixed sending extra packets after end of file