partitioner: fix apply_partitions

- fix config file read procedure
- fix formatting command execution
- fix logging

TODO: remove code duplication.