Fixed todo, now reports if the file could or could not be written