Proper writing of OrderedDict
OderedDict for repr_for_yaml
catch exceptions in read_file and other improvments to help creaet the intial index from branch