Added cookie check and update script