exit when StopIteration raised
remove redundant logging