Added logging to script execution.