improve checking startup of tmux or screen