writeFile update and commenting