This is a transision code to move load logs logic to JavaScript.