test for a bug - next() returns one null at the end
clean up
clean up
fix - detect end of stream inside readable-handler