Fixed bug with KeyNotFoundException when resolving identity file.

Accessing dictionary with unexisting key with throw KeyNotFoundException.