Move the Writer to utils.py