improved log mechanism