Path logfilePath = Paths.get(logpath);
if (Files.exists(logfilePath)) {
Path preservedPath = Paths.get(logpath + ".1");
Files.move(logfilePath, preservedPath, StandardCopyOption.REPLACE_EXISTING);
}
fh = new LogfileHandler(logpath);
fh.setFormatter(new LogfileFormatter());
logger.addHandler(fh);
} catch (SecurityException e) {
throw new CloudsyncException("Unexpected error on logfile creation", e);
} catch (IOException e) {