private void createDirectoryIfNewPage(FileSystem fileSystem) throws Exception { String pagePath = getFileSystemPath(); if (!fileSystem.exists(pagePath)) { fileSystem.makeDirectory(pagePath); cmSystem.update(pagePath); } }