--- a/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
+++ b/kernel/private/classes/clusterfilehandlers/dfsbackends/dfs.php
@@ -44,7 +44,11 @@ class eZDFSFileHandlerDFSBackend
         }
         else
         {
-            $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ), false );
+            $contents = file_get_contents( $srcFilePath );
+            if ( $contents === false )
+                $ret = false;
+            else
+                $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ), false );
         }
 
         $this->accumulatorStop();
@@ -73,7 +77,13 @@ class eZDFSFileHandlerDFSBackend
         if ( file_exists( dirname( $dstFilePath ) ) )
             $ret = copy( $srcFilePath, $dstFilePath );
         else
-            $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ) );
+        {
+            $contents = file_get_contents( $srcFilePath );
+            if ( $contents === false )
+                $ret = false;
+            else
+                $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ) );
+        }
 
         $this->accumulatorStop();
 
@@ -92,13 +102,36 @@ class eZDFSFileHandlerDFSBackend
     {
         $this->accumulatorStart();
 
-        if ( $dstFilePath === false )
+        $srcFileContents = file_get_contents( $srcFilePath );
+
+        if ( $srcFileContents === false )
+        {
+            eZDebug::writeError( "Error getting contents of file '$srcFilePath'.", __METHOD__ );
+            $ret = false;
+        } else
         {
-            $dstFilePath = $srcFilePath;
-        }
-        $dstFilePath = $this->makeDFSPath( $dstFilePath );
-        $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), file_get_contents( $srcFilePath ), true );
 
+            if ( $dstFilePath === false )
+            {
+                $dstFilePath = $srcFilePath;
+            }
+            $dstFilePath = $this->makeDFSPath( $dstFilePath );
+
+            $ret = eZFile::create( basename( $dstFilePath ), dirname( $dstFilePath ), $srcFileContents, true );
+
+            if ( $ret )
+            {
+
+                $srcFileSize = strlen( $srcFileContents );
+                clearstatcache( true, $dstFilePath );
+                $ret = filesize( $dstFilePath );
+                if ( $ret != $srcFileSize )
+                {
+                    eZDebug::writeError( "Size ($ret) of written data for file '$dstFilePath' does not match expected size " . $srcFileSize, __METHOD__ );
+                    $ret = false;
+                }
+            }
+        }
         $this->accumulatorStop();
 
         return $ret;
diff --git a/kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php b/kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php
index af6e0e8..1720d74 100644
--- a/kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php
+++ b/kernel/private/classes/clusterfilehandlers/dfsbackends/mysqli.php
@@ -33,6 +33,8 @@ CREATE TABLE ezdfsfile (
 
 class eZDFSFileHandlerMySQLiBackend
 {
+    const MAX_COPY_TRIES = 5; //number of times a failed dfs file is tried to be fetched when the process fails 
+    const TIME_UNTIL_RETRY = 100; //wait for n microseconds until retry if copy fails
     /**
      * Connects to the database.
      *
@@ -588,6 +590,10 @@ class eZDFSFileHandlerMySQLiBackend
     public function _fetch( $filePath, $uniqueName = false )
     {
         $metaData = $this->_fetchMetadata( $filePath );
+        $DFSSideFileSize = filesize( $this->dfsbackend->getMountpoint() . $filePath );
+        $localFileSize = 0;
+        $loopCount = 0;
+
         if ( !$metaData )
         {
             // @todo Throw an exception
@@ -596,38 +602,46 @@ class eZDFSFileHandlerMySQLiBackend
         }
         $contentLength = $metaData['size'];
 
-        // create temporary file
-        if ( strrpos( $filePath, '.' ) > 0 )
-            $tmpFilePath = substr_replace( $filePath, getmypid().'tmp', strrpos( $filePath, '.' ), 0  );
-        else
-            $tmpFilePath = $filePath . '.' . getmypid().'tmp';
-        $this->__mkdir_p( dirname( $tmpFilePath ) );
-
-        // copy DFS file to temporary FS path
-        // @todo Throw an exception
-        if ( !$this->dfsbackend->copyFromDFS( $filePath, $tmpFilePath ) )
+        while ( $DFSSideFileSize > $localFileSize && $loopCount < self::MAX_COPY_TRIES ) 
         {
-            eZDebug::writeError("Failed copying DFS://$filePath to FS://$tmpFilePath ");
-            return false;
+            // create temporary file
+            $tmpid = getmypid() . '-' . rand() .'tmp';
+            if ( strrpos( $filePath, '.' ) > 0 )
+                $tmpFilePath = substr_replace( $filePath, $tmpid, strrpos( $filePath, '.' ), 0  );
+            else
+                $tmpFilePath = $filePath . '.' . $tmpid;
+            $this->__mkdir_p( dirname( $tmpFilePath ) );
+            eZDebugSetting::writeDebug( 'kernel-clustering', "copying DFS://$filePath to FS://$tmpFilePath on try: $loopCount " );
+
+            // copy DFS file to temporary FS path
+            // @todo Throw an exception
+            if ( !$this->dfsbackend->copyFromDFS( $filePath, $tmpFilePath ) )
+            {
+                eZDebug::writeError("Failed copying DFS://$filePath to FS://$tmpFilePath ");
+            }
+            if ( $uniqueName !== true )
+            {
+                if ( !eZFile::rename( $tmpFilePath, $filePath, false, eZFile::CLEAN_ON_FAILURE | eZFile::APPEND_DEBUG_ON_FAILURE ) );
+            }
+            $filePath = ($uniqueName) ? $tmpFilePath : $filePath ;
+
+            // Make sure all data is written correctly
+            clearstatcache( true, $filePath );
+            $localFileSize = filesize($filePath);
+            if ( $DFSSideFileSize > $localFileSize )
+            {
+                usleep( self::TIME_UNTIL_RETRY );
+            }
+            $loopCount ++;
         }
 
-        // Make sure all data is written correctly
-        clearstatcache();
-        $tmpSize = filesize( $tmpFilePath );
         // @todo Throw an exception
-        if ( $tmpSize != $metaData['size'] )
-        {
-            eZDebug::writeError( "Size ($tmpSize) of written data for file '$tmpFilePath' does not match expected size " . $metaData['size'], __METHOD__ );
-            return false;
-        }
 
-        if ( $uniqueName !== true )
+        if ( $DFSSideFileSize > $localFileSize ) 
         {
-            eZFile::rename( $tmpFilePath, $filePath, false, eZFile::CLEAN_ON_FAILURE | eZFile::APPEND_DEBUG_ON_FAILURE );
-        }
-        else
-        {
-            $filePath = $tmpFilePath;
+            eZDebug::writeError( "Size ($localFileSize) of written data for file '$tmpFilePath' does not match expected size " . $metaData['size'], __METHOD__ );
+            unlink($tmpFilePath);
+            return false;
         }
 
         return $filePath;
@@ -819,7 +833,7 @@ class eZDFSFileHandlerMySQLiBackend
     function _storeInner( $filePath, $datatype, $scope, $fname )
     {
         // Insert file metadata.
-        clearstatcache();
+        clearstatcache( true, $filePath );
         $fileMTime = filemtime( $filePath );
         $contentLength = filesize( $filePath );
         $filePathHash = md5( $filePath );
@@ -841,7 +855,8 @@ class eZDFSFileHandlerMySQLiBackend
         }
 
         // copy given $filePath to DFS
-        if ( !$this->dfsbackend->copyToDFS( $filePath ) )
+        $ret = $this->dfsbackend->copyToDFS( $filePath );
+        if ( $ret === false || $ret != $contentLength )
         {
             return $this->_fail( "Failed to copy FS://$filePath to DFS://$filePath" );
         }
diff --git a/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php b/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php
index 63f0dca..f57dc55 100644
--- a/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php
+++ b/kernel/private/classes/clusterfilehandlers/ezdfsfilehandler.php
@@ -565,7 +565,10 @@ class eZDFSFileHandler implements eZClusterFileHandlerInterface, ezpDatabaseBase
                         eZDebugSetting::writeDebug( 'kernel-clustering', "Callback from DB file {$this->filePath}", __METHOD__ );
                         if ( self::LOCAL_CACHE )
                         {
-                            $this->fetch();
+                            if ( $this->fetch() == FALSE )
+                            {
+                                return new eZClusterFileFailure ( 3, "Failed retrieving file from DFS.");
+                            }
 
                             // Figure out which mtime to use for new file, must be larger than
                             // mtime in DB at least.
--- a/lib/ezfile/classes/ezfile.php
+++ b/lib/ezfile/classes/ezfile.php
@@ -91,7 +91,7 @@ class eZFile
             if ( $atomic )
             {
                 // If the renaming process fails, delete the temporary file
-                eZFile::rename( $filepath, $realpath, false, eZFile::CLEAN_ON_FAILURE );
+                return eZFile::rename( $filepath, $realpath, false, eZFile::APPEND_DEBUG_ON_FAILURE );
             }
             return true;
         }
@@ -209,6 +209,7 @@ class eZFile
             if ( $flags & self::CLEAN_ON_FAILURE )
                     unlink( $srcFile );
         }
+        eZDebug::writeDebug( "TMPDEBUG:copy of $srcFile to $destFile with success: $status " );
 
         return $status;
     }
--- a/lib/ezutils/classes/ezexpiryhandler.php
+++ b/lib/ezutils/classes/ezexpiryhandler.php
@@ -35,8 +35,14 @@ class eZExpiryHandler
     function restore()
     {
         $Timestamps = $this->CacheFile->processFile( array( $this, 'fetchData' ) );
-        $this->Timestamps = $Timestamps;
-        $this->IsModified = false;
+        if ( $Timestamps )
+        {
+            $this->Timestamps = $Timestamps;
+            $this->IsModified = false;
+            return true;
+        }
+        eZDebug::writeError( " Fatal error - could not restore expiry.php file. WRK messg. ", __METHOD__ );
+        exit;
     }
 
     /**