Add close method to server