changed ptphelper to ptpmanager
some error handling for leaving session