Add function to dump results in a yaml file.