Added the offline logic and get  data on app start