Updated the script to use Log