Avoid duplication.
Close service if failure during setID.