File file = new File(directory, m_sFilename);
try {
ShapefileDataStore dataStore = new ShapefileDataStore(DataUtilities.fileToURL(file));
dataStore.createSchema(m_FeatureType);
manager.addResource(new ShapefileResource(dataStore, directory));
return dataStore;
} catch(Throwable t) {
LOGGER.log(Level.SEVERE, "Could not create shapefile output ", t);
IOUtils.delete(directory);