Set up config and logging