Added log calls to track execution issue