Problems:
There is a class which defines events of an insert and memory сard removal. I generate these events connecting phone to a notebook as mass storage (remove event), disabling phone from a notebook when it is connected as mass storage (insert event) and through pc suite (insert event).
After I will do it two times (sometimes through time or more), there is a following: the program defines that the disk is inserted, successfully accesses to it, but through small time - all functions which access to it to a disk return KErrNotReady, and then through any time the disk is again accessible.

Some source code:
Code:
void CFileSystemMonitor::Monitor(MFileSystemMonitorObserver* aObs)
{
    if ( !IsActive() )
    {
        // Request to get notified of MMC insertion/removal events
        iFs.NotifyChange( ENotifyDisk, iStatus );
        SetActive();
    }
    iObs = aObs;
    if (!iObs)
    {
        Cancel();
    }
}
TMap<TInt, TMediaType> CFileSystemMonitor::ReadDiskStatusL()
{
    TMap<TInt, TMediaType> newDriveMap;
    
    TDriveList list;
    iFs.DriveList(list);
    for (TInt driveNumber = EDriveA; driveNumber <= EDriveZ; driveNumber++)
    {
        if (list[driveNumber])
        {
            //Find the drive number and asign it to installDrive variable.
            TVolumeInfo info;
            TInt err = iFs.Volume(info, driveNumber);
            if (err == KErrNone)
            {
                TChar driveLetter;
                err = iFs.DriveToChar(driveNumber,driveLetter);
                if (err != KErrNone)
                {
                	LOG_ERROR(TString8("CFileSystemMonitor::ReadDiskStatusL DriveToChar err:")+err+TString8(",driveNumber:")+driveNumber);
                }
                else
                {

                      newDriveMap.PutL(driveNumber, info.iDrive.iType);
                }
            }
            else
            {
            	LOG_ERROR(TString8("CFileSystemMonitor::ReadDiskStatusL err:")+err+TString8(",driveNumber:")+driveNumber);
            }
		}
    }
    return newDriveMap;
}
void CFileSystemMonitor::RunL()
{
    if (iStatus == KErrNone)
    {
        if (!iObs)
        {
        	LOG_INFO(TString8("CFileSystemMonitor::RunL !iObs"));
            return;
        }
        
        TMap<TInt, TMediaType> newDriveMap = ReadDiskStatusL();
		
		for (TInt i = 0; i < iDiskTypes.Count(); i++)
		{
			if (!newDriveMap.HasKey(iDiskTypes.GetKeyByIndex(i)))
			{
				iObs->DiskRemoved(iDiskTypes.GetKeyByIndex(i));
			}
		}
		for (TInt i = 0; i < newDriveMap.Count(); i++)
		{
			if (!iDiskTypes.HasKey(newDriveMap.GetKeyByIndex(i)))
			{
				TFileName path;
				TRAPD(err, path = Utilities::GetDrivePathL(newDriveMap.GetKeyByIndex(i)));
				if (err == KErrNone)
				{
					TFileName fname;
					RFile file;
					TInt i = 0;
					do
					{
						++i;
						err = file.Temp(iFs,path,fname,EFileRead);//sometimes return KErrNotReady!!!!!
						if (err != KErrNone)
						{
							LOG_ERROR(TString8("CFileSystemMonitor::RunL disk inserted,path:")+path+TString8(",error:")+err+TString8(",i:")+i);
						}
						else
						{
							LOG_INFO(TString8("CFileSystemMonitor::RunL,path:")+path+TString8(",fname:")+fname);
						}
					}
					while (err != KErrNone && i < 50);
					
					TBool isOpen = EFalse;                
					err = iFs.IsFileOpen(fname,isOpen);//sometimes return KErrNotReady!!!!!
					if (err != KErrNone)
					{
						LOG_ERROR(TString8("CFileSystemMonitor::RunL IsFileOpen,err:")+err);
					}
					else if (isOpen)
					{
						file.Close();
						err = iFs.Delete(fname);
						LOG_ERROR(TString8("CFileSystemMonitor::RunL Delete,err:")+err);
					}
				}
				/*
					functions access to inserted disk it are called in iObs->DiskInserted  sometimes return KErrNotReady!!!!!
				*/
				iObs->DiskInserted(newDriveMap.GetKeyByIndex(i));
			}
		}
		iDiskTypes = newDriveMap;
		
		// Issue request for next event notification
		Monitor(iObs);
    }
    else
    {
    	LOG_ERROR(TString8("CFileSystemMonitor::RunL error:")+iStatus.Int());
    }
}
I 'm using two different object of CFileSystemMonitor with two different observer for listen notify changes of disk

Question and request:
In what there can be a problem, what do I do incorrectly? Help me, please.