* add try catch to ensure subprocess killed if test of attach/detach fails * remove unnecessary comments * remove duplicated cleanup
* add try catch to ensure subprocess killed if test of attach/detach fails * remove unnecessary comments * remove duplicated cleanup