Make ToFile() a method on config