Working with files and dictionaries