Removes logging and calls sync disconnect function.