hook for custimizing offline behavior