Save error logging every loop