better logging, trim spaces, sample config