Switching recording to buffer