Using line.close() to stop reading strams (instead of assertions).