Reinstate set -e and add -n to ssh inocations to prevent them swallowing following commands