adding a messages recorder
refactoring: added argument for MessageRecorder to mcmc_writer