private void ReadPackageQueueI()
        {
            string packageQueueString;

            if (_deviceUtil.TryTakeValue(PackageQueueStorageName, out packageQueueString))
            {
                _packageQueue = new List <ActivityPackage>();

                List <string> packageQueueStringList =
                    JsonConvert.DeserializeObject <List <string> >(packageQueueString);
                foreach (var activityPackageMapString in packageQueueStringList)
                {
                    var activityPackageMap =
                        JsonConvert.DeserializeObject <Dictionary <string, string> >(activityPackageMapString);
                    var activityPackage = ActivityPackage.FromDictionary(activityPackageMap);
                    _packageQueue.Add(activityPackage);
                }
            }
            else
            {
                var packageQueueLegacyFile = _deviceUtil.GetLegacyStorageFile(PackageQueueLegacyFilename).Result;

                // if package queue is not found, try to read it from the legacy file
                _packageQueue = Util.DeserializeFromFileAsync(
                    file: packageQueueLegacyFile,
                    objectReader: ActivityPackage.DeserializeListFromStreamLegacy, // deserialize function from Stream to List of ActivityPackage
                    defaultReturn: () => null,                                     // default value in case of error
                    objectName: PackageQueueLegacyName)                            // package queue name
                                .Result;

                // if it's successfully read from legacy source, store it using new persistance
                // and then delete the old file
                if (_packageQueue != null)
                {
                    _logger.Info("Legacy PackageQueue File found and successfully read.");

                    WritePackageQueueI();

                    if (_deviceUtil.TryTakeValue(PackageQueueStorageName, out packageQueueString))
                    {
                        packageQueueLegacyFile.DeleteAsync();
                        _logger.Info("Legacy PackageQueue File deleted.");
                    }
                }
            }

            if (_packageQueue != null)
            {
                _logger.Debug("Package handler read {0} packages", _packageQueue.Count);
            }
            else
            {
                _packageQueue = new List <ActivityPackage>();
            }
        }