Added context close method.