moving to version 2: TODO: move most of pipeline code to scripts
TODO: make write_meta overwritable - update / insert