diff --git a/src/Form/MediaBulkUploadForm.php b/src/Form/MediaBulkUploadForm.php
index d7a45c8..5ba83db 100644
--- a/src/Form/MediaBulkUploadForm.php
+++ b/src/Form/MediaBulkUploadForm.php
@@ -401,10 +401,12 @@ class MediaBulkUploadForm extends FormBase {
     ]);
     $fileEntity->save();
 
-    file_move($fileEntity, $destination);
+    $isFileMoved = file_move($fileEntity, $destination);
+    if (!$isFileMoved || !$fileEntity) {
+      $this->messenger()->addError($this->t('File :filename could not be created.', [':filename' => $filename]), 'error');
+    }
 
     if (!$fileEntity) {
-      $this->messenger()->addError($this->t('File :filename could not be created.', [':filename' => $filename]), 'error');
       throw new \Exception('File entity could not be created.');
     }
 
