Query when open/close successfully.