Only write file out on save. Fixes #20