call destroy_server at the end of main