Correct saving of image files.