Added exception handling to server kill