Added small write_dict_to_file function which writes dictionary passed as **kwargs parameter to already open result_file also passed as a parameter.