check for end of file to gracefully stop requesting lines from the
client handle. Only output captured output in spec if there is some to output.