Looping on -r improvements:

	1.  make it conditional on -l,

	2.  try to deal with EOF and errors properly.