Fix mcmc_writer header and tests