add check to slave connection before log is big