added error handling for paramiko query

because it fails at doing what it should be doing.