Added UI thread method to be used when saving inside of controller.