fix minor bug: last line of config was ommited if not termined by newline
added small print method to dump config (can be used in producers)