Pretreatment of wood before impregnation