moved eof check to new type of stream, need to check the rest of the libaray
fixed invalid eof behaver from limitrstream
adapted libaray to the eof change