op.setProgressListener(cli.getProgressListener()).call();
FeatureJSON fjson = new FeatureJSON();
@SuppressWarnings("rawtypes")
FeatureCollection fc = featureSource.getFeatures();
writer = new FileWriter(file);
fjson.writeFeatureCollection(fc, writer);
} catch (IllegalArgumentException iae) {
throw new org.locationtech.geogig.cli.InvalidParameterException(iae.getMessage(), iae);
} catch (GeoToolsOpException e) {
file.delete();
switch (e.statusCode) {