added exception handling to ClientHandler class