Save configuration to file