watch for changes and save where appropriate