improved partition finding, added writing of partitions to files, added test config