Got rid of sh requirement
Also: more robust error handling and ability to close opened tunnel connection