Changes to write spelling file