Log the output of the script to a file and stdout

Thanks for the implementation, @pbrisbin.