save ios to file helper method added