Added database saving on destroy mainActivity