close session write in observe methods