clean image with error path
update
reset function done