Updated to checkt HAVE_ERRORCHECK_MUTEX