added code to check for SGE
code to make sure the launcher script dies if ssh is unable to connect