Made changes to the Client Thread so it keeps running until application is aborted