JK: Adding some log calls.