Adding open_handle check