Saving to image and txt