fix config file generation, rubocop improvements