Factor generate-config-file out of config-file to make testing more convenient