Move offline case to separate file