added more config and logging