Add callback to close method