added conditional check for xctool