for (Long fileID : selectedFiles) {
try {
DrawableFile<?> file = controller.getFileFromId(fileID);
Category oldCat = file.getCategory();
// remove file from old category group
controller.getGroupManager().removeFromGroup(new GroupKey<Category>(DrawableAttribute.CATEGORY, oldCat), fileID);
//remove old category tag if necessary
List<ContentTag> allContentTags = Case.getCurrentCase().getServices().getTagsManager().getContentTagsByContent(file);