NXP-15490: add proper close method