fix logging bug and modify connector