Working with cookie
Updated the add_to_log function which were erroring out with the correct cmid value