added context manager to UcsServer class