Simplify. Avoid creating blank files when the image does not exist or on errors.