Loads the configuration from the file.
This method reads the YAML file, maps it to an instance of type T, and then saves it back to the file to ensure all default values and comments are present.