public function preRemove($eventArgs)
    {
        $entity = $eventArgs->getEntity();
        foreach ($this->metadata->getManagedFields($entity) as $field) {
            $file = PropertyHelper::getValue($entity, $field);

            if ($file) {
                $filepath = $this->fileManager->getFilePath($entity, $field, $file);

                $this->unitOfWork[spl_object_hash($entity)][$field]['delete'] = function (FileManager $fm) use ($filepath) {
                    $fm->delete($filepath);
                };
            }
        }
    }