Added the join helper
added the loop, and writes to a gz