* Added custom method for sendding connect terminate commands
* Use else clause in try-except statements at few places