Add log and logexec to the script