Started testing writeFile