add double check lock in logger closes #32