Fixed get_config, did some tuning and added logging possibility