Add Log function to script