public void writeWithThumbnail(FileItemStream item,
String imageName, String thumbnailName) throws Exception {
// use name for update of session
String itemName = item.getName();
ServiceLocator locator = ServiceLocator.getInstance();
FileSystem fs = locator.getFileSystem();
logger.fine("Getting fileItem from memory - " + itemName);
OutputStream imgOut = null;
OutputStream thumbOut = null;