check before open a new tab