@Override
public synchronized void persist(Device device) throws ConfigurationException {
String deviceName = device.getDeviceName();
String pathName = deviceRef(deviceName);
if (PreferencesUtils.nodeExists(rootPrefs, pathName))
throw new ConfigurationAlreadyExistsException(pathName);
Preferences deviceNode = rootPrefs.node(pathName);
storeTo(device, deviceNode);
storeChilds(device, deviceNode);
try {