Replace ks file with auto generated file (ordered and commented)