public void checkWorkingStoreFiles( String strStoreDir, CExtendedLogger Logger, CLanguage Lang ) {
	
		try {
			
			File[] workingStoreFileList = net.maindataservices.Utilities.recursiveFindFilesToLoad( strStoreDir, ".working", 1, 1);

			SimpleDateFormat DF = new SimpleDateFormat( "dd/MM/yyy" ); 
			SimpleDateFormat TF = new SimpleDateFormat( "HH:mm:ss:SSS" ); 
			
			String strUUID = UUID.randomUUID().toString();
			
			String strMinimalBlockData = _XML_Header;
			strMinimalBlockData += _Header + "CreatedDate=\"" + DF.format( new Date() ) + "\" CreatedTime=\"" + TF.format( new Date() ) + "\" InstanceID=\"" + strUUID + "\" DataBlockID=\"" + strUUID + "\" />\n"; 
			strMinimalBlockData += "<DataBlock>\n";
			strMinimalBlockData += "</DataBlock>\n";
			
			long lngMinimalDataLength = strMinimalBlockData.length() + 15;
			
			for ( File workingStoreFile : workingStoreFileList ) {

				if ( workingStoreFile.length() >= lngMinimalDataLength ) {
				
					RandomAccessFile Reader = new RandomAccessFile( workingStoreFile, "rw" );
					String strLastLine = "";
					String strLine;

					while ( ( strLine = Reader.readLine() ) != null ) {

						strLastLine = strLine;

					}

					if ( strLastLine.equalsIgnoreCase( "</DataBlock>" ) == false ) {

						Reader.writeChars( "</DataBlock>\n" );

					}

					Reader.close();			

					String strFileName = workingStoreFile.getName();
					
					if ( strFileName.endsWith( ".working" ) ) {
						
						strFileName = strFileName.substring( 0, strFileName.length() - ".working".length() );
						
					}
					
					//Publish the current store file changing the name from ????????.working to ????????.db
					workingStoreFile.renameTo( new File( ConfigPlainTextDBReplicationStore.strStoreDir + ConfigPlainTextDBReplicationStore.strName + File.separatorChar + strFileName + ".db" ) );
					
					publishDataBlockToStoreIndex( strFileName + ".db", Logger, Lang);
					
				}
				else {
					
					workingStoreFile.delete();
					
				}
				
			}
		
		}
    	catch ( Error Err ) {

    		if ( Logger != null )
    			Logger.logError( "-1020", Err.getMessage(), Err );

    	}
    	catch ( Exception Ex ) {

    		if ( Logger != null )
    			Logger.logException( "-1021", Ex.getMessage(), Ex );

    	}
	    
	}