only write file if there are changes
Merge pull request #12 from rbrcurtis/master

only write file if there are changes