When called on local machine with output from qstat on cluster, the socket.gethostname returns the name of the local machine instead of the cluster With this change the host name can be specified (optionally)