Changes to how file is written