add basic writefile tests