actually writes to file now