Index: kernel/classes/clusterfilehandlers/ezfsfilehandler.php
===================================================================
--- kernel/classes/clusterfilehandlers/ezfsfilehandler.php	(revision 22910)
+++ kernel/classes/clusterfilehandlers/ezfsfilehandler.php	(working copy)
@@ -214,20 +214,8 @@
 
         eZDebug::accumulatorStart( 'dbfile', false, 'dbfile' );
 
-        if ( !( $fh = fopen( $filePath, 'w' ) ) )
-        {
-            eZDebug::writeError( "Cannot open file '$filePath'", 'eZFSFileHandler::fileStoreContents()' );
-            return false;
-        }
+        eZFile::create( basename( $filePath ), dirname( $filePath ), $contents, true );
 
-        if ( fwrite( $fh, $contents ) === false )
-        {
-            eZDebug::writeError( "Cannot write to '$filePath'", 'eZFSFileHandler::fileStoreContents()' );
-            return false;
-        }
-
-        fclose( $fh );
-
         $perm = eZINI::instance()->variable( 'FileSettings', 'StorageFilePermissions' );
         chmod( $filePath, octdec( $perm ) );
 
