Added exception handling for case where SSH tunnel gets terminated
prematurely.