adds very simple write and writeFile methods