processing images and saving only if images are good