A big part of initially learning to foil is learning how to crash safely, including learning when to bail instead of trying to save it. Front foot pressure as you fall off helps. Sheeting all the way in and starting kite to zenith also helps. Rigging a large enough kite so you can keep it high in the window helps.