core: remove trailing space in log message when writing a configuration file