Added log in logic