redirecting output of the script to a log file