handle err from NewServer