Add Utility for writing files

Should have been added earlier but a branch switch drama was had