move storage stuff to background thread