fix bug, when append config file, \n# will be added