added log barrier functionality