Added tmux check for closing panes