continue the loop if there is an error
use less memory