Accessing Log output in script