Made Boris' script compatible with my output format