Moved tmux attachment check down a bit to allow for server commands to be run first if desired