log works correctly