fix log + error + better config.