Removed some debug statements and added connection termaination