Refactor Action::Base#write_config