Fixed function write_dict_to_file calls in main function: there was no result_file argument passed
Ficed write_dict_to_file function calls in main: now it is called with ** where the dictionary is passed. Also formatting of text was made better looking