tweak config file creation
correctly parse keyfile