Saving png and preferences